Deep/All.pm

filter: Statementstmt 100% 35 / 35 Branchbran 100% 4 / 4 Conditioncond 100% 3 / 3 MC/DCmcdc 100% 2 / 2 Subroutinesub 100% 7 / 7 Podpod 0.0% 0 / 3 totaltotal 94.4% 51 / 54 CC 5 SCAR 7.4
CC
5
Cov
100%
init
3.0
descend
3.0
BEGIN
1.0
CRAP 2.1
« Deep/HashElements.pm ↑ Summary Deep/Cache.pm »
1 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Test::Deep::All 1.205;
5  
6 3 ▶use Scalar::Util ();
Subroutine BEGIN: called CC=1 SCAR=0.0
7 3 ▶use Test::Deep::Cmp;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 sub init
10 10 ▶{
Subroutine init: called CC=3 SCAR=11.0
Pod undocumented
11 10 my $self = shift;
12  
13 my @list = map {
14 10 (Scalar::Util::blessed($_) && $_->isa('Test::Deep::All'))
15 18 ▶ ? @{ $_->{val} }
Branch: 1 branch
BranchTrueFalseTotal
builtin::blessed($_) && $_->isa('Test::Deep::All') ? : 2 16 18
Condition100%3/3
builtin::blessed($_) and $_->isa("Test::Deep::All")
!ll&&!rl&&r
882
MC/DC100%2/2
builtin::blessed($_) and $_->isa("Test::Deep::All")
builtin::blessed($_) $_->isa("Test::Deep::All")
Truth table100%3/3
A and B
A= builtin::blessed($_)B= $_->isa("Test::Deep::All")
ABresult
0X0
100
111
16 : $_
17 } @_;
18  
19 10 $self->{val} = \@list;
20 }
21  
22 sub descend
23 7 ▶{
Subroutine descend: called CC=3 SCAR=11.0
Pod undocumented
24 7 my $self = shift;
25 7 my $got = shift;
26  
27 7 my $data = $self->data;
28  
29 7 my $index = 1;
30  
31 7 foreach my $cmp (@{$self->{val}})
32 {
33 15 $data->{index} = $index;
34 15 $index++;
35  
36 15 ▶ next if Test::Deep::descend($got, $cmp);
Branch: 1 branch
BranchTrueFalseTotal
if Test::Deep::descend($got, $cmp) 12 3 15
37 3 return 0
38 }
39  
40 4 return 1;
41 }
42  
43 sub render_stack
44 3 ▶{
Subroutine render_stack: called CC=1 SCAR=0.0
Pod undocumented
45 3 my $self = shift;
46 3 my $var = shift;
47 3 my $data = shift;
48  
49 3 my $max = @{$self->{val}};
50  
51 3 return "(Part $data->{index} of $max in $var)";
52 }
53  
54 3 1;
55  
56 __END__
« Deep/HashElements.pm ↑ Summary Deep/Cache.pm »