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

filter: Statementstmt 100% 18 / 18 Branchbran 100% 4 / 4 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 5 / 5 Podpod 0.0% 0 / 3 totaltotal 91.4% 32 / 35 CC 5 SCAR 11.7
CC
5
Cov
100%
subroutine
5.0
BEGIN
1.0
BEGIN
1.0
CRAP 3.2
« blib/lib/Devel/ebug/Backend/Plugin/Pad.pm ↑ Summary lib/Devel/ebug/Plugin/Run.pm »
1 package Devel::ebug::Backend::Plugin::Basic;
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 6 return (basic => { sub => \&basic });
10 }
11  
12 17 ▶sub basic {
Subroutine basic: called CC=1 SCAR=0.0
Pod undocumented
13 17 my ($req, $context) = @_;
14 return {
15 codeline => $context->{codeline},
16 filename => $context->{filename},
17 finished => $context->{finished},
18 line => $context->{line},
19 package => $context->{package},
20 17 subroutine => subroutine($req, $context),
21 };
22 }
23  
24 17 ▶sub subroutine {
Subroutine subroutine: called CC=5 SCAR=16.1
Pod undocumented
25 17 my ($req, $context) = @_;
26 17 foreach my $sub (keys %DB::sub) {
27 22100 my ($filename, $start, $end) = $DB::sub{$sub} =~ m/^(.+):(\d+)-(\d+)$/;
28 22100 ▶ next if $filename ne $context->{filename};
Branch: 1 branch
BranchTrueFalseTotal
if $filename ne $context->{"filename"} 21448 652 22100
29 652 ▶ next unless $context->{line} >= $start && $context->{line} <= $end;
Branch: 1 branch
BranchTrueFalseTotal
unless $context->{"line"} >= $start and $context->{"line"} <= $end 636 16 652
Condition100%3/3
$context->{"line"} >= $start and $context->{"line"} <= $end
!ll&&!rl&&r
5973916
MC/DC100%2/2
$context->{"line"} >= $start and $context->{"line"} <= $end
$context->{"line"} >= $start $context->{"line"} <= $end
Truth table100%3/3
A and B
A= $context->{"line"} >= $startB= $context->{"line"} <= $end
ABresult
0X0
100
111
30 16 return $sub;
31 }
32 1 return 'main';
33 }
34  
35 6 1;
36  
37 __END__
« blib/lib/Devel/ebug/Backend/Plugin/Pad.pm ↑ Summary lib/Devel/ebug/Plugin/Run.pm »