Deep/RegexpOnly.pm

filter: Statementstmt 100% 26 / 26 Branchbran 75.0% 3 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 8 / 8 Podpod 0.0% 0 / 4 totaltotal 88.1% 37 / 42 CC 3 SCAR 3.4
CC
3
Cov
97%
init
2.0
descend
2.0
BEGIN
1.0
CRAP 1.4
« Deep/Number.pm ↑ Summary Deep/Hash.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::RegexpOnly 1.205;
5  
6 1 ▶use Test::Deep::Cmp;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 1 ▶use Scalar::Util qw( blessed );
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 sub init
11 2 ▶{
Subroutine init: called CC=2 SCAR=7.0
Pod undocumented
12 2 my $self = shift;
13  
14 2 my $val = shift;
15  
16 2 ▶ $val = ref $val ? $val : qr/$val/;
Branch: 1 branch
BranchTrueFalseTotal
ref $val ? : 2 0 2
17  
18 2 $self->{val} = $val;
19 }
20  
21 sub descend
22 2 ▶{
Subroutine descend: called CC=2 SCAR=6.9
Pod undocumented
23 2 my $self = shift;
24 2 my $got = shift;
25  
26 2 my $re = $self->{val};
27  
28 2 ▶ return $got =~ $self->{val} ? 1 : 0;
Branch: 1 branch
BranchTrueFalseTotal
$got =~ /$self->{'val'}/ ? : 1 1 2
29 }
30  
31 sub diag_message
32 1 ▶{
Subroutine diag_message: called CC=1 SCAR=0.0
Pod undocumented
33 1 my $self = shift;
34  
35 1 my $where = shift;
36  
37 1 return "Using Regexp on $where";
38 }
39  
40 sub renderExp
41 1 ▶{
Subroutine renderExp: called CC=1 SCAR=0.0
Pod undocumented
42 1 my $self = shift;
43  
44 1 return "$self->{val}";
45 }
46  
47 1 1;
48  
49 __END__
« Deep/Number.pm ↑ Summary Deep/Hash.pm »