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

filter: Statementstmt 97.1% 69 / 71 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 90.9% 20 / 22 Podpod 0.0% 0 / 2 totaltotal 92.9% 92 / 99 CC 1 SCAR 0.2
CC
1
Cov
96%
run
1.1
run
1.1
run
1.1
CRAP 1.0
« lib/Devel/Trepan/CmdProcessor/Command/Next.pm ↑ Summary example/next2.pl »
1 # -*- coding: utf-8 -*-
2 # Copyright (C) 2011-2012, 2015 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 # rlib '../running'
8 # rlib '../../app/breakpoint' # FIXME: possibly temporary
9  
10 package Devel::Trepan::CmdProcessor::Command::Continue;
11  
12 12 ▶use if !@ISA, Devel::Trepan::CmdProcessor::Command ;
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
13  
14 12 ▶unless (@ISA) {
Branch: 1 branch
BranchTrueFalseTotal
unless (@ISA) 11 1 12
15 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
16 use constant ALIASES => qw(c cont);
17 use constant CATEGORY => 'running';
18 use constant SHORT_HELP => 'Continue running until end or brkpt';
19 use constant MIN_ARGS => 0; # Need at least this many
20 use constant MAX_ARGS => 2; # Need at most this many
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);
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine BEGIN: called CC=1 SCAR=0.0
27 12 @ISA = @CMD_ISA;
28 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
29  
30 12 our $NAME = set_name();
31 =pod
32  
33 =head2 Synopsis:
34  
35 =cut
36 12 our $HELP = <<"HELP";
37 =pod
38  
39 B<continue> [I<location>]
40  
41 Leave the debugger loop and continue execution. Subsequent entry to
42 the debugger however may occur via breakpoints or explicit calls, or
43 exceptions.
44  
45 If a parameter is given, a temporary breakpoint is set at that position
46 before continuing.
47  
48 =head2 Examples:
49  
50 continue
51 continue 10 # continue to line 10
52 continue gcd # continue to first instruction of method gcd
53  
54 =head2 See also:
55  
56 L<C<step>|Devel::Trepan::CmdProcessor::Command::Step>,
57 L<C<next>|Devel::Trepan::CmdProcessor::Command::Next>,
58 L<C<finish>|Devel::Trepan::CmdProcessor::Command::Finish>, and
59 L<C<help syntax location>|Devel::Trepan::CmdProcessor::Command::Help::location>
60  
61 =cut
62 HELP
63  
64  
65 # This method runs the command
66 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
67 0 my ($self, $args) = @_;
68 0 $self->{proc}->continue($args);
69 }
70  
71 1 ▶if (__FILE__ eq $0) {
Branch: 1 branch
BranchTrueFalseTotal
if (__FILE__ eq $0) 0 12 12
72 # require_relative '../mock'
73 # dbgr, cmd = MockDebugger::setup
74 # p cmd.run([cmd.name])
75 }
76  
77 1 1;
« lib/Devel/Trepan/CmdProcessor/Command/Next.pm ↑ Summary example/next2.pl »