File Coverage

lib/Devel/Trepan/CmdProcessor/Command/Info.pm
Criterion Covered Total %
statement 63 63 100.0
branch n/a
condition n/a
subroutine 21 21 100.0
pod n/a
total 84 84 100.0


line stmt bran cond sub pod time code
1             # -*- coding: utf-8 -*-
2             # Copyright (C) 2011-2014 Rocky Bernstein <rocky@cpan.org>
3 12     12   109 use warnings; no warnings 'redefine';
  12     12   36  
  12     1   499  
  12     1   100  
  12         35  
  12         669  
  1         7  
  1         3  
  1         27  
  1         10  
  1         2  
  1         43  
4              
5             package Devel::Trepan::CmdProcessor::Command::Info;
6 12     12   83 use rlib '../../../..';
  12     1   29  
  12         88  
  1         6  
  1         2  
  1         7  
7              
8 12     12   5401 use if !@ISA, Devel::Trepan::CmdProcessor::Command::Subcmd::SubMgr;
  12     1   31  
  12         82  
  1         427  
  1         2  
  1         6  
9 12     12   647 use if !@ISA, Devel::Trepan::CmdProcessor::Command;
  12     1   34  
  12         80  
  1         42  
  1         2  
  1         5  
10             unless (@ISA) {
11 12     12   85 eval <<'EOE';
  12     12   35  
  12     12   702  
  12     12   77  
  12     12   28  
  12         491  
  12         68  
  12         29  
  12         499  
  12         72  
  12         31  
  12         458  
  12         73  
  12         43  
  12         460  
12             use constant SHORT_HELP => 'Information about debugged program and its environment';
13             use constant CATEGORY => 'status';
14             use constant MIN_ARGS => 0; # Need at least this many
15             use constant MAX_ARGS => undef; # Need at most this many - undef -> unlimited.
16             use constant NEED_STACK => 0;
17             EOE
18             }
19              
20 12     12   2142 use strict;
  12     1   37  
  12         319  
  1         48  
  1         3  
  1         26  
21 12     12   61 use vars qw(@ISA);
  12     1   34  
  12         650  
  1         4  
  1         2  
  1         48  
22             @ISA = qw(Devel::Trepan::CmdProcessor::Command::SubcmdMgr);
23 12     12   83 use vars @CMD_VARS;
  12     1   28  
  12         1917  
  1         6  
  1         2  
  1         145  
24              
25             our $NAME = set_name();
26             =pod
27              
28             =head2 Synopsis:
29              
30             =cut
31             our $HELP = <<'HELP';
32             =pod
33              
34             B<info> [I<info sub-commmand> ...]
35              
36             Generic command for showing things about the program being debugged.
37              
38             You can give unique prefix of the name of a subcommand to get
39             information about just that subcommand.
40              
41             Type C<info> for a list of subcommands and what they do.
42              
43             Type C<help info *> for a list of C<info> subcommands.
44              
45             =head2 See also:
46              
47             L<C<info
48             breakpoints>|Devel::Trepan::CmdProcessor::Command::Info::Breakpoints>,
49             L<C<info files>|Devel::Trepan::CmdProcessor::Command::Info::Files>,
50             L<C<info frame>|Devel::Trepan::CmdProcessor::Command::Info::Frame>,
51             L<C<info functions>|Devel::Trepan::CmdProcessor::Command::Info::Functions>,
52             L<C<info line>|Devel::Trepan::CmdProcessor::Command::Info::Line>,
53             L<C<info macros>|Devel::Trepan::CmdProcessor::Command::Info::Macros>,
54             L<C<info packages>|Devel::Trepan::CmdProcessor::Command::Info::Packages>,
55             L<C<info program>|Devel::Trepan::CmdProcessor::Command::Info::Program>,
56             L<C<info return>|Devel::Trepan::CmdProcessor::Command::Info::Return>,
57             L<C<info signals>|Devel::Trepan::CmdProcessor::Command::Info::Signals>,
58             L<C<info variables>|Devel::Trepan::CmdProcessor::Command::Info::Variables>,
59             and
60             L<C<info watch>|Devel::Trepan::CmdProcessor::Command::Info::Watch>
61             =cut
62              
63             HELP
64              
65             unless (caller) {
66             require Devel::Trepan::CmdProcessor;
67             my $proc = Devel::Trepan::CmdProcessor->new(undef, 'bogus');
68             my $cmd = Devel::Trepan::CmdProcessor::Command::Info->new($proc, $NAME);
69             # require_relative '../mock'
70             # dbgr, cmd = MockDebugger::setup
71             $cmd->run([$NAME])
72             }
73              
74             1;