lib/Devel/ebug/Plugin/ActionPoints.pm

filter: Statementstmt 66.0% 33 / 50 Branchbran 50.0% 2 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 72.7% 8 / 11 Podpod 0.0% 0 / 8 totaltotal 58.9% 43 / 73 CC 3 SCAR 7.3
CC
3
Cov
65%
break_point_delete
6.0
break_point
2.0
break_points_with_condition
2.0
CRAP 2.1
« blib/lib/Devel/ebug/Backend/Plugin/Eval.pm ↑ Summary blib/lib/Devel/ebug/Backend/Plugin/Ping.pm »
1 package Devel::ebug::Plugin::ActionPoints;
2  
3 31 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 31 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 31 ▶use base qw(Exporter);
Subroutine BEGIN: called CC=1 SCAR=0.0
6 31 our @EXPORT = qw(break_point break_point_delete break_point_subroutine break_points break_points_with_condition all_break_points_with_condition watch_point break_on_load);
7  
8 31 our $VERSION = '0.69'; # VERSION
9  
10 # set a break point (by default in the current file)
11 15 ▶sub break_point {
Subroutine break_point: called CC=2 SCAR=6.9
Pod undocumented
12 15 my $self = shift;
13 15 my($filename, $line, $condition);
14 15 ▶ if ($_[0] =~ /^\d+$/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($_[0] =~ /^\d+$/) { } 13 2 15
15 13 $filename = $self->filename;
16 } else {
17 2 $filename = shift;
18 }
19 15 ($line, $condition) = @_;
20 15 my $response = $self->talk({
21 command => "break_point",
22 filename => $filename,
23 line => $line,
24 condition => $condition,
25 });
26 15 return $response->{line};
27 }
28  
29 # delete a break point (by default in the current file)
30 0 ▶sub break_point_delete {
Subroutine break_point_delete: not called CC=2 SCAR=17.9
Pod undocumented
31 0 my $self = shift;
32 0 my($filename, $line);
33 0 my $first = shift;
34 0 ▶ if ($first =~ /^\d+$/) {
Branch: 1 branch
BranchTrueFalseTotal
if ($first =~ /^\d+$/) { } 0 0 0
35 0 $line = $first;
36 0 $filename = $self->filename;
37 } else {
38 0 $filename = $first;
39 0 $line = shift;
40 }
41  
42 0 my $response = $self->talk({
43 command => "break_point_delete",
44 filename => $filename,
45 line => $line,
46 });
47 }
48  
49 # set a break point
50 8 ▶sub break_point_subroutine {
Subroutine break_point_subroutine: called CC=1 SCAR=0.0
Pod undocumented
51 8 my($self, $subroutine, $condition) = @_;
52 8 my $response = $self->talk({
53 command => "break_point_subroutine",
54 subroutine => $subroutine,
55 condition => $condition,
56 });
57 8 return $response->{line};
58 }
59  
60 # list break points
61 2 ▶sub break_points {
Subroutine break_points: called CC=1 SCAR=0.0
Pod undocumented
62 2 my($self, $filename) = @_;
63 2 my $response = $self->talk({
64 command => "break_points",
65 filename => $filename,
66 });
67 2 return @{$response->{break_points}};
68 }
69  
70 # list break points with condition
71 0 ▶sub break_points_with_condition {
Subroutine break_points_with_condition: not called CC=1 SCAR=6.9
Pod undocumented
72 0 my($self, $filename) = @_;
73 0 my $response = $self->talk({
74 command => "break_points_with_condition",
75 filename => $filename,
76 });
77 0 return @{$response->{break_points}};
78 }
79  
80 # list break points with condition for the whole program
81 0 ▶sub all_break_points_with_condition {
Subroutine all_break_points_with_condition: not called CC=1 SCAR=6.9
Pod undocumented
82 0 my($self, $filename) = @_;
83 0 my $response = $self->talk({
84 command => "all_break_points_with_condition",
85 filename => $filename,
86 });
87 0 return @{$response->{break_points}};
88 }
89  
90  
91 # set a watch point
92 4 ▶sub watch_point {
Subroutine watch_point: called CC=1 SCAR=0.0
Pod undocumented
93 4 my($self, $watch_point) = @_;
94 4 my $response = $self->talk({
95 command => "watch_point",
96 watch_point => $watch_point,
97 });
98 }
99  
100  
101 # set a break point on file loading
102 2 ▶sub break_on_load {
Subroutine break_on_load: called CC=1 SCAR=0.0
Pod undocumented
103 2 my $self = shift;
104 2 my($filename) = @_;
105  
106 2 my $response = $self->talk({
107 command => "break_on_load",
108 filename => $filename,
109 });
110 2 return $response->{line};
111 }
112  
113 31 1;
114  
115 __END__
« blib/lib/Devel/ebug/Backend/Plugin/Eval.pm ↑ Summary blib/lib/Devel/ebug/Backend/Plugin/Ping.pm »