lib/Devel/ebug/Plugin/Codelines.pm

filter: Statementstmt 81.8% 18 / 22 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 100% 4 / 4 Podpod 0.0% 0 / 1 totaltotal 70.5% 24 / 34 CC 3 SCAR 9.0
CC
3
Cov
74%
codelines
3.9
BEGIN
1.0
BEGIN
1.0
CRAP 2.5
« lib/Devel/ebug/Plugin/Pad.pm ↑ Summary blib/lib/Devel/ebug/Backend/Plugin/Eval.pm »
1 package Devel::ebug::Plugin::Codelines;
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(codelines);
7  
8 31 our $VERSION = '0.69'; # VERSION
9  
10 # return some lines of code
11 1 ▶sub codelines {
Subroutine codelines: called CC=3 SCAR=13.6
Pod undocumented
12 1 my($self) = shift;
13 1 my($filename, @lines);
14 1 ▶ if (!defined($_[0]) || $_[0] =~ /^\d+$/) {
Branch: 1 branch
BranchTrueFalseTotal
if (not defined $_[0] or $_[0] =~ /^\d+$/) { } 1 0 1
Condition33%1/3
not defined $_[0] or $_[0] =~ /^\d+$/
l!l&&r!l&&!r
100
MC/DC0%0/2
not defined $_[0] or $_[0] =~ /^\d+$/
not defined $_[0] $_[0] =~ /^\d+$/
Truth table33%1/3
not(A) or B
A= not defined $_[0]B= $_[0] =~ /^\d+$/
ABresult
1X1
011
000
15 1 $filename = $self->filename;
16 } else {
17 0 $filename = shift;
18 }
19 0 @lines = map { $_ -1 } @_;
20 1 my $response = $self->talk({
21 command => "codelines",
22 filename => $filename,
23 lines => \@lines,
24 });
25 0 return @{$response->{codelines}};
26 }
27  
28 31 1;
29  
30 __END__
« lib/Devel/ebug/Plugin/Pad.pm ↑ Summary blib/lib/Devel/ebug/Backend/Plugin/Eval.pm »