« lib/Devel/Trepan/DB/Use.pm
↑ Summary
blib/lib/Devel/Trepan/CmdProcessor/Command/Load_Subcmd/Source.pm »
| 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::Show; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 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 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | 1 | ▶ | unless (@ISA) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 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
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | use constant CATEGORY => 'status'; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | use constant SHORT_HELP => 'Show parts of the debugger environment'; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | use constant MIN_ARGS => 0; # Need at least this many | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | use constant MAX_ARGS => undef; # Need at most this many - undef -> unlimited. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | use constant NEED_STACK => 0; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 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 | 12 | our $NAME = set_name(); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | =pod | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | =head2 Synopsis: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 33 | 1 | our $HELP = <<'HELP'; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 34 | =pod | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 36 | B<show> [I<show sub-commmand> ...] | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 38 | Generic command for showing things about the debugger. You can | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 39 | give unique prefix of the name of a subcommand to get information | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 40 | about just that subcommand. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 42 | Type C<show> for a list of show subcommands and what they do. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 44 | Type C<help show *> for a list of C<show> subcommands. | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 46 | =head2 See also: | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 48 | L<C<show abbrev>|Devel::Trepan::CmdProcessor::Command::Show::Abbrev>, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 49 | L<C<show aliases>|Devel::Trepan::CmdProcessor::Command::Show::Aliases>, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 50 | L<C<show args>|Devel::Trepan::CmdProcessor::Command::Show::args>, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 51 | L<C<show auto>|Devel::Trepan::CmdProcessor::Command::Show::Auto>, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 52 | L<C<show basename>|Devel::Trepan::CmdProcessor::Command::Show::Basename>, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 53 | L<C<show confirm>|Devel::Trepan::CmdProcessor::Command::Show::Confirm>, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 54 | L<C<show debug>|Devel::Trepan::CmdProcessor::Command::Show::Debug>, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 55 | L<C<show different>|Devel::Trepan::CmdProcessor::Command::Show::Different>, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 56 | L<C<show display>|Devel::Trepan::CmdProcessor::Command::Show::Display>, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 57 | L<C<show highlight>|Devel::Trepan::CmdProcessor::Command::Show::Highlight>, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 58 | L<C<show interactive>|Devel::Trepan::CmdProcessor::Command::Show::Interactive>, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 59 | L<C<show max>|Devel::Trepan::CmdProcessor::Command::Show::Max>, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 60 | L<C<show timer>|Devel::Trepan::CmdProcessor::Command::Show::Timer>, | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 61 | L<C<show trace>|Devel::Trepan::CmdProcessor::Command::Show::Trace>, and | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 62 | L<C<show version>|Devel::Trepan::CmdProcessor::Command::Show::Version> | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 63 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 64 | =cut | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 65 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 66 | HELP | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 67 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 68 | sub run($$) | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 69 | 0 | ▶ | { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
run: not called CC=4 SCAR=22.9
Subroutine
run: not called CC=4 SCAR=22.9
Pod
undocumented
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 70 | 0 | my ($self, $args) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 71 | 0 | my $first; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 72 | 0 | ▶ | if (scalar @$args > 1) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 73 | 0 | $first = lc $args->[1]; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 74 | 0 | my $alen = length('auto'); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 75 | 0 | ▶ | splice(@$args, 1, 1, ('auto', substr($first, $alen))) if | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 2 branches
Condition0%0/6
index($first, "auto") == 0 and length $first > $alen
index($first, "auto") == 0 and length $first > $alen
MC/DC0%0/2
index($first, "auto") == 0 and length $first > $alen
index($first, "auto") == 0
length $first > $alen
MC/DC0%0/2
index($first, "auto") == 0 and length $first > $alen
index($first, "auto") == 0
length $first > $alen
Truth table0%0/3
A and B
A= index($first, "auto") == 0B= length $first > $alen
Truth table0%0/3
A and B
A= index($first, "auto") == 0B= length $first > $alen
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 76 | index($first, 'auto') == 0 && length($first) > $alen; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 77 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 78 | 0 | $self->SUPER::run($args); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 79 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 80 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 81 | 1 | ▶ | unless (caller) { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 82 | 0 | require Devel::Trepan::CmdProcessor; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 83 | 0 | my $proc = Devel::Trepan::CmdProcessor->new(undef, 'bogus'); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 84 | 0 | my $cmd = __PACKAGE__->new($proc, $NAME); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 85 | # require_relative '../mock' | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 86 | # dbgr, cmd = MockDebugger::setup | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 87 | 0 | $cmd->run([$NAME]) | |||||||||||||||||||||||||||||||||||||||||||||||||
| 88 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 89 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 90 | 1 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||