Deep/RegexpRef.pm

filter: Statementstmt 84.6% 22 / 26 Branchbran 25.0% 2 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 3 totaltotal 68.1% 30 / 44 CC 5 SCAR 14.7
CC
5
Cov
71%
descend
8.1
renderGot
2.0
BEGIN
1.0
CRAP 4.3
« Deep/Shallow.pm ↑ Summary Deep/HashKeysOnly.pm »
1 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Test::Deep::RegexpRef 1.205;
5  
6 1 ▶use Test::Deep::Ref;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Test::Deep::RegexpVersion;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 sub init
10 2 ▶{
Subroutine init: called CC=1 SCAR=0.0
Pod undocumented
11 2 my $self = shift;
12  
13 2 my $val = shift;
14  
15 2 $self->{val} = $val;
16 }
17  
18 sub descend
19 2 ▶{
Subroutine descend: called CC=5 SCAR=20.9
Pod undocumented
20 2 my $self = shift;
21  
22 2 my $got = shift;
23  
24 2 my $exp = $self->{val};
25  
26 2 ▶ if ($Test::Deep::RegexpVersion::OldStyle) {
Branch: 1 branch
BranchTrueFalseTotal
if ($Test::Deep::RegexpVersion::OldStyle) { } 0 2 2
27 0 ▶ return 0 unless $self->test_class($got, "Regexp");
Branch: 1 branch
BranchTrueFalseTotal
unless $self->test_class($got, "Regexp") 0 0 0
28 0 ▶ return 0 unless $self->test_reftype($got, "SCALAR");
Branch: 1 branch
BranchTrueFalseTotal
unless $self->test_reftype($got, "SCALAR") 0 0 0
29 } else {
30 2 ▶ return 0 unless $self->test_reftype($got, "REGEXP");
Branch: 1 branch
BranchTrueFalseTotal
unless $self->test_reftype($got, "REGEXP") 0 2 2
31 }
32  
33 2 return Test::Deep::descend($got, Test::Deep::regexprefonly($exp));
34 }
35  
36 sub renderGot
37 0 ▶{
Subroutine renderGot: not called CC=1 SCAR=6.9
Pod undocumented
38 0 my $self = shift;
39  
40 0 return shift()."";
41 }
42  
43 1 1;
44  
45 __END__
« Deep/Shallow.pm ↑ Summary Deep/HashKeysOnly.pm »