blib/lib/Devel/ebug/Backend/Plugin/Run.pm

filter: Statementstmt 72.2% 26 / 36 Branchbran 16.6% 1 / 6 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 5 totaltotal 61.1% 33 / 54 CC 4 SCAR 15.1
CC
4
Cov
64%
return
12.0
run
2.0
BEGIN
1.0
CRAP 4.5
« lib/Devel/ebug.pm ↑ Summary blib/lib/Devel/ebug/Backend/Plugin/Pad.pm »
1 package Devel::ebug::Backend::Plugin::Run;
2  
3 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 6 our $VERSION = '0.69'; # VERSION
7  
8 6 ▶sub register_commands {
Subroutine register_commands: called CC=1 SCAR=0.0
Pod undocumented
9 return (
10 6 next => { sub => \&next, record => 1 },
11 return => { sub => \&return, record => 1 },
12 run => { sub => \&run, record => 1 },
13 step => { sub => \&step, record => 1 },
14 );
15 }
16  
17 3 ▶sub next {
Subroutine next: called CC=1 SCAR=0.0
Pod undocumented
18 3 my($req, $context) = @_;
19 3 $context->{mode} = "next"; # single step (but over subroutines)
20 3 $context->{last} = 1; # and out of the loop
21 3 return {};
22 }
23  
24 0 ▶sub return {
Subroutine return: not called CC=3 SCAR=24.8
Pod undocumented
25 0 my($req, $context) = @_;
26 0 ▶ if ($req->{values}) {
Branch: 1 branch
BranchTrueFalseTotal
if ($req->{"values"}) 0 0 0
27 0 $context->{stack}->[0]->{'return'} = $req->{values};
28 }
29 0 $context->{mode} = "return"; # run until returned from subroutine
30 0 $DB::single = 0; # run
31 0 ▶ if ($context->{stack}->[-1]) {
Branch: 1 branch
BranchTrueFalseTotal
if ($context->{"stack"}[-1]) 0 0 0
32 0 $context->{stack}->[-1]->{single} = 1; # single step higher up
33 }
34 0 $context->{last} = 1; # and out of the loop
35 0 return {};
36 }
37  
38 10 ▶sub run {
Subroutine run: called CC=2 SCAR=7.1
Pod undocumented
39 10 my($req, $context) = @_;
40 # a SIGINT that arrived while we were stopped is stale; don't let it
41 # stop us again at the very next statement
42 10 $DB::signal = 0;
43 10 $context->{mode} = "run"; # run until break point
44 10 ▶ if (@{$context->{watch_points}}) {
Branch: 1 branch
BranchTrueFalseTotal
if (@{$context->{'watch_points'};}) { } 0 10 10
45 # watch points, let's go slow
46 0 $context->{watch_single} = 0;
47 } else {
48 # no watch points? let's go fast!
49 10 $DB::single = 0; # run until next break point
50 }
51 10 $context->{last} = 1; # and out of the loop
52 10 return {};
53 }
54  
55  
56 2 ▶sub step {
Subroutine step: called CC=1 SCAR=0.0
Pod undocumented
57 2 my($req, $context) = @_;
58 2 $DB::single = 1; # single step
59 2 $context->{mode} = "step"; # single step (into subroutines)
60 2 $context->{last} = 1; # and out of the loop, onto the next command
61 2 return {};
62 }
63  
64  
65 6 1;
66  
67 __END__
« lib/Devel/ebug.pm ↑ Summary blib/lib/Devel/ebug/Backend/Plugin/Pad.pm »