Deep/RegexpMatches.pm

filter: Statementstmt 100% 29 / 29 Branchbran 100% 2 / 2 Conditioncond 66.6% 2 / 3 MC/DCmcdc 50.0% 1 / 2 Subroutinesub 100% 9 / 9 Podpod 0.0% 0 / 4 totaltotal 87.7% 43 / 49 CC 3 SCAR 4.4
CC
3
Cov
97%
init
3.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.5
« Deep/Cmp.pm ↑ Summary Deep/Boolean.pm »
1 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Test::Deep::RegexpMatches 1.205;
5  
6 6 ▶use Test::Deep::Array;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 6 ▶use base 'Test::Deep::Array';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 6 ▶use Scalar::Util qw( blessed );
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 sub init
13 5 ▶{
Subroutine init: called CC=3 SCAR=11.0
Pod undocumented
14 5 my $self = shift;
15  
16 5 my $val = shift;
17  
18 5 ▶ $val = Test::Deep::array($val) unless
Branch: 1 branch
BranchTrueFalseTotal
unless builtin::blessed($val) and $val->isa("Test::Deep::Cmp") 3 2 5
Condition66%2/3
builtin::blessed($val) and $val->isa("Test::Deep::Cmp")
!ll&&!rl&&r
302
MC/DC50%1/2
builtin::blessed($val) and $val->isa("Test::Deep::Cmp")
builtin::blessed($val) $val->isa("Test::Deep::Cmp")
Truth table66%2/3
A and B
A= builtin::blessed($val)B= $val->isa("Test::Deep::Cmp")
ABresult
0X0
100
111
19 blessed($val) and $val->isa("Test::Deep::Cmp");
20  
21 5 $self->{val} = $val;
22 5 $self->{regex} = shift;
23 }
24  
25 sub descend
26 5 ▶{
Subroutine descend: called CC=1 SCAR=0.0
Pod undocumented
27 5 my $self = shift;
28  
29 5 my $got = shift;
30  
31 5 return Test::Deep::descend($got, $self->{val});
32 }
33  
34 sub render_stack
35 2 ▶{
Subroutine render_stack: called CC=1 SCAR=0.0
Pod undocumented
36 2 my $self = shift;
37  
38 2 my $stack = shift;
39  
40 2 $stack = "[$stack =~ $self->{regex}]";
41  
42 2 return $stack;
43 # return $self->SUPER::render_stack($stack);
44 }
45  
46 sub reset_arrow
47 2 ▶{
Subroutine reset_arrow: called CC=1 SCAR=0.0
Pod undocumented
48 2 return 1;
49 }
50  
51 6 1;
52  
53 __END__
« Deep/Cmp.pm ↑ Summary Deep/Boolean.pm »