File Coverage

lib/Devel/Trepan/CmdProcessor/Command/Show_Subcmd/Version.pm
Criterion Covered Total %
statement 48 52 92.3
branch n/a
condition n/a
subroutine 16 18 88.8
pod n/a
total 64 70 91.4


line stmt bran cond sub pod time code
1             # -*- coding: utf-8 -*-
2             # Copyright (C) 2011, 2014 Rocky Bernstein <rockb@cpan.org>
3 12     12   107 use warnings; no warnings 'redefine'; no warnings 'once';
  12     12   38  
  12     12   479  
  12     2   77  
  12     2   35  
  12     2   365  
  12         68  
  12         32  
  12         312  
  2         19  
  2         6  
  2         69  
  2         14  
  2         6  
  2         79  
  2         15  
  2         5  
  2         68  
4 12     12   72 use rlib '../../../../..';
  12     2   37  
  12         74  
  2         18  
  2         8  
  2         14  
5              
6             package Devel::Trepan::CmdProcessor::Command::Show::Version;
7              
8 12     12   5346 use Devel::Trepan::CmdProcessor::Command::Subcmd::Core;
  12     2   37  
  12         312  
  2         895  
  2         7  
  2         46  
9              
10 12     12   68 use strict;
  12     2   40  
  12         331  
  2         11  
  2         5  
  2         47  
11 12     12   69 use vars qw(@ISA @SUBCMD_VARS);
  12     2   31  
  12         783  
  2         9  
  2         5  
  2         115  
12             @ISA = qw(Devel::Trepan::CmdProcessor::Command::Subcmd);
13             # Values inherited from parent
14 12     12   77 use vars @Devel::Trepan::CmdProcessor::Command::Subcmd::SUBCMD_VARS;
  12     2   36  
  12         2678  
  2         10  
  2         6  
  2         361  
15              
16             =head2 Synopsis:
17              
18             =cut
19             our $HELP = <<"EOH";
20             =pod
21              
22             B<show version>
23              
24             Show debugger name and version
25             =cut
26             EOH
27              
28             our $SHORT_HELP = "Show debugger name and version";
29              
30             sub run($$) {
31 0     0     my ($self, $args) = @_;
  0     0      
32 0           $self->{proc}->msg(Devel::Trepan::show_version());
  0            
33             }
34              
35             unless (caller) {
36             require Devel::Trepan;
37             # Demo it.
38             # require_relative '../../mock'
39             # my($dbgr, $parent_cmd) = MockDebugger::setup('show');
40             # $cmd = __PACKAGE__->new(parent_cmd);
41             # $cmd->run(@$cmd->prefix);
42             }
43              
44             # Suppress a "used-once" warning;
45             $HELP || scalar @SUBCMD_VARS;