File Coverage

lib/Devel/Trepan/CmdProcessor/Command/Load.pm
Criterion Covered Total %
statement 66 66 100.0
branch n/a
condition n/a
subroutine 22 22 100.0
pod n/a
total 88 88 100.0


line stmt bran cond sub pod time code
1             # -*- coding: utf-8 -*-
2             # Copyright (C) 2011-2012, 2014 Rocky Bernstein <rocky@cpan.org>
3 12     12   102 use warnings; no warnings 'redefine';
  12     12   28  
  12     1   481  
  12     1   62  
  12         25  
  12         491  
  1         6  
  1         2  
  1         26  
  1         5  
  1         2  
  1         27  
4 12     12   64 use rlib '../../../..';
  12     1   23  
  12         99  
  1         5  
  1         2  
  1         5  
5              
6             package Devel::Trepan::CmdProcessor::Command::Load;
7              
8 12     12   5237 use if !@ISA, Devel::Trepan::CmdProcessor::Command::Subcmd::SubMgr;
  12     1   27  
  12         91  
  1         356  
  1         1  
  1         5  
9 12     12   731 use if !@ISA, Devel::Trepan::CmdProcessor::Command;
  12     1   25  
  12         45  
  1         32  
  1         2  
  1         4  
10             unless (@ISA) {
11 12     12   70 eval <<'EOE';
  12     12   25  
  12     12   556  
  12     12   64  
  12     12   26  
  12     12   453  
  12         62  
  12         28  
  12         441  
  12         63  
  12         29  
  12         437  
  12         61  
  12         25  
  12         550  
  12         63  
  12         27  
  12         384  
12             use constant ALIASES => qw(reload);
13             use constant CATEGORY => 'support';
14             use constant MAX_ARGS => undef; # Need at most this many - undef -> unlimited.
15             use constant MIN_ARGS => 0; # Need at least this many
16             use constant NEED_STACK => 0;
17             use constant SHORT_HELP => 'Load or reload something Perlish';
18             EOE
19             }
20              
21 12     12   2100 use strict;
  12     1   25  
  12         288  
  1         62  
  1         2  
  1         21  
22 12     12   58 use vars qw(@ISA);
  12     1   27  
  12         564  
  1         4  
  1         2  
  1         53  
23             @ISA = qw(Devel::Trepan::CmdProcessor::Command::SubcmdMgr);
24 12     12   66 use vars @CMD_VARS;
  12     1   26  
  12         1863  
  1         6  
  1         1  
  1         167  
25              
26             $NAME = set_name();
27             =pod
28              
29             =head2 Synopsis:
30              
31             =cut
32             our $HELP = <<"HELP";
33             =pod
34              
35             B<load> [I<load sub-commmand> ...]
36              
37             Generic command for loading or reloading.
38              
39             You can give unique prefix of the name of a subcommand to get
40             information about just that subcommand.
41              
42             Type C<help load *> for a just list of C<load> subcommands.
43              
44             Type C<load> for a list of subcommands and what they do.
45              
46             =head2 See also:
47              
48             L<C<load subcmd>|Devel::Trepan::CmdProcessor::Command::Load::Subcmd>,
49             L<C<load command>|Devel::Trepan::CmdProcessor::Command::Load::Command>,
50             L<C<load module>|Devel::Trepan::CmdProcessor::Command::Load::module>, and
51             L<C<load source>|Devel::Trepan::CmdProcessor::Command::Load::Source>.
52              
53             =cut
54             HELP
55              
56             unless (caller) {
57             require Devel::Trepan::CmdProcessor;
58             my $proc = Devel::Trepan::CmdProcessor->new(undef, 'bogus');
59             my $cmd = Devel::Trepan::CmdProcessor::Command::Show->new($proc, $NAME);
60             # require_relative '../mock'
61             # dbgr, cmd = MockDebugger::setup
62             $cmd->run([$NAME])
63             }
64              
65             1;