| 1 | # -*- coding: utf-8 -*- | ||||||||||
| 2 | # Copyright (C) 2011-2012, 2014 Rocky Bernstein <rocky@cpan.org> | ||||||||||
| 3 | 12 | ▶ | use warnings; no warnings 'redefine'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 12 | ▶ | use rlib '../../../..'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | package Devel::Trepan::CmdProcessor::Command::Load; | ||||||||||
| 7 | |||||||||||
| 8 | 12 | ▶ | use if !@ISA, Devel::Trepan::CmdProcessor::Command::Subcmd::SubMgr; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 12 | ▶ | use if !@ISA, Devel::Trepan::CmdProcessor::Command; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | ▶ | unless (@ISA) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 11 | 0 | ▶ | eval <<'EOE'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 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 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 22 | 12 | ▶ | use vars qw(@ISA); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 23 | 1 | @ISA = qw(Devel::Trepan::CmdProcessor::Command::SubcmdMgr); | |||||||||
| 24 | 12 | ▶ | use vars @CMD_VARS; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 25 | |||||||||||
| 26 | 1 | $NAME = set_name(); | |||||||||
| 27 | =pod | ||||||||||
| 28 | |||||||||||
| 29 | =head2 Synopsis: | ||||||||||
| 30 | |||||||||||
| 31 | =cut | ||||||||||
| 32 | 1 | 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 | 1 | ▶ | unless (caller) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 57 | 0 | require Devel::Trepan::CmdProcessor; | |||||||||
| 58 | 0 | my $proc = Devel::Trepan::CmdProcessor->new(undef, 'bogus'); | |||||||||
| 59 | 0 | my $cmd = Devel::Trepan::CmdProcessor::Command::Show->new($proc, $NAME); | |||||||||
| 60 | # require_relative '../mock' | ||||||||||
| 61 | # dbgr, cmd = MockDebugger::setup | ||||||||||
| 62 | 0 | $cmd->run([$NAME]) | |||||||||
| 63 | } | ||||||||||
| 64 | |||||||||||
| 65 | 1 | 1; | |||||||||