lib/Devel/Trepan/CmdProcessor/Command/Next.pm

filter: Statementstmt 93.5% 72 / 77 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 90.9% 20 / 22 Podpod 0.0% 0 / 2 totaltotal 90.4% 95 / 105 CC 1 SCAR 0.2
CC
1
Cov
93%
run
1.1
run
1.1
run
1.1
CRAP 1.0
« lib/Devel/Trepan/CmdProcessor/Command/Server.pm ↑ Summary lib/Devel/Trepan/CmdProcessor/Command/Continue.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  
5 12 ▶use rlib '../../../..';
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 # require_relative '../../app/condition'
8  
9 package Devel::Trepan::CmdProcessor::Command::Next;
10  
11 12 ▶use if !@ISA, Devel::Trepan::CmdProcessor::Command ;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 12 ▶unless (@ISA) {
Branch: 1 branch
BranchTrueFalseTotal
unless (@ISA) 11 1 12
14 12 ▶ 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
15 use constant ALIASES => qw(n next+ next- n+ n-);
16 use constant CATEGORY => 'running';
17 use constant SHORT_HELP => 'Step program without entering called functions';
18 use constant MIN_ARGS => 0; # Need at least this many
19 use constant MAX_ARGS => 1; # Need at most this many -
20 # undef -> unlimited.
21 use constant NEED_STACK => 1;
22 EOE
23 }
24  
25 12 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
26 12 ▶use vars qw(@ISA); @ISA = @CMD_ISA;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
27 12 ▶use vars @CMD_VARS; # Value inherited from parent
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
28  
29 1 our $NAME = set_name();
30 =pod
31  
32 =head2 Synopsis:
33  
34 =cut
35 1 our $HELP = <<'HELP';
36 =pod
37  
38 B<next>[B<+>|B<->] [I<count>]
39  
40 Step one statement ignoring steps into function calls at this level.
41 Sometimes this is called 'step over'.
42  
43 With an integer argument, perform 'next' that many times. However if
44 an exception occurs at this level, or we 'return' or 'yield' or the
45 thread changes, we stop regardless of count.
46  
47 A suffix of C<+> on the command or an alias to the command forces to
48 move to another line, while a suffix of C<-> does the opposite and
49 disables the requiring a move to a new line. If no suffix is given,
50 the debugger setting 'different' determines this behavior.
51  
52 If no suffix is given, the debugger setting 'different'
53 determines this behavior.
54  
55 =head2 Example:
56  
57 next
58  
59 =head2 See also:
60  
61 L<C<step> (step into)|Devel::Trepan::CmdProcessor::Command::Step>,
62 L<C<finish> (step out)|Devel::Trepan::CmdProcessor::Command::Finish>,
63 L<C<continue>|Devel::Trepan::CmdProcessor::Command::Continue>
64  
65 =cut
66 HELP
67  
68 # This method runs the command
69 0 ▶sub run($$) {
Subroutine run: not called CC=1 SCAR=1.2
Subroutine run: not called CC=1 SCAR=1.2
Pod undocumented
Pod undocumented
70 0 my ($self, $args) = @_;
71 0 my $proc = $self->{proc};
72 0 my $opts = $proc->parse_next_step_suffix($args->[0]);
73  
74 # FIXME: parse and adjust step count
75 0 $proc->{skip_count} = 0;
76  
77 0 $proc->next($opts);
78 }
79  
80 1 ▶unless (caller) {
Branch: 1 branch
BranchTrueFalseTotal
unless (caller) 0 12 12
81 # require_relative '../mock'
82 # dbgr, cmd = MockDebugger::setup
83 # p cmd.run([cmd.name])
84 }
85  
86 1 1;
« lib/Devel/Trepan/CmdProcessor/Command/Server.pm ↑ Summary lib/Devel/Trepan/CmdProcessor/Command/Continue.pm »