Deep/ArrayEach.pm

filter: Statementstmt 87.5% 21 / 24 Branchbran 50.0% 1 / 2 Conditioncond 33.3% 1 / 3 MC/DCmcdc 0.0% 0 / 2 Subroutinesub 85.7% 6 / 7 Podpod 0.0% 0 / 3 totaltotal 70.7% 29 / 41 CC 3 SCAR 6.2
CC
3
Cov
79%
descend
3.2
renderExp
2.0
BEGIN
1.0
CRAP 1.9
« Deep/Any.pm ↑ Summary Deep/ScalarRef.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::ArrayEach 1.205;
5  
6 1 ▶use Test::Deep::Cmp;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 1 ▶use Scalar::Util ();
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=3 SCAR=11.8
Pod undocumented
20 2 my $self = shift;
21 2 my $got = shift;
22  
23 2 ▶ return unless ref $got && Scalar::Util::reftype($got) eq 'ARRAY';
Branch: 1 branch
BranchTrueFalseTotal
unless ref $got and builtin::reftype($got) eq "ARRAY" 0 2 2
Condition33%1/3
ref $got and builtin::reftype($got) eq "ARRAY"
!ll&&!rl&&r
002
MC/DC0%0/2
ref $got and builtin::reftype($got) eq "ARRAY"
ref $got builtin::reftype($got) eq "ARRAY"
Truth table33%1/3
A and B
A= ref $gotB= builtin::reftype($got) eq "ARRAY"
ABresult
0X0
100
111
24 2 my $exp = [ ($self->{val}) x @$got ];
25  
26 2 return Test::Deep::descend($got, $exp);
27 }
28  
29 sub renderExp
30 0 ▶{
Subroutine renderExp: not called CC=1 SCAR=6.9
Pod undocumented
31 0 my $self = shift;
32 0 my $exp = shift;
33  
34 0 return '[ ' . $self->SUPER::renderExp($self->{val}) . ', ... ]';
35 }
36  
37 1 1;
38  
39 __END__
« Deep/Any.pm ↑ Summary Deep/ScalarRef.pm »