Deep/ArrayLengthOnly.pm

filter: Statementstmt 100% 28 / 28 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 9 / 9 Podpod 0.0% 0 / 6 totaltotal 86.0% 37 / 43 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Deep/Blessed.pm ↑ Summary Deep/RegexpRefOnly.pm »
1 18 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
2 18 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
3  
4 package Test::Deep::ArrayLengthOnly 1.205;
5  
6 18 ▶use Test::Deep::Ref;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 sub init
9 140 ▶{
Subroutine init: called CC=1 SCAR=0.0
Pod undocumented
10 140 my $self = shift;
11  
12 140 my $val = shift;
13  
14 140 $self->{val} = $val;
15 }
16  
17 sub descend
18 140 ▶{
Subroutine descend: called CC=1 SCAR=0.0
Pod undocumented
19 140 my $self = shift;
20 140 my $got = shift;
21  
22 140 my $len = $self->{val};
23  
24 140 return @$got == $len;
25 }
26  
27 sub render_stack
28 8 ▶{
Subroutine render_stack: called CC=1 SCAR=0.0
Pod undocumented
29 8 my $self = shift;
30 8 my ($var, $data) = @_;
31  
32 8 return "array length of $var";
33 }
34  
35 sub renderVal
36 16 ▶{
Subroutine renderVal: called CC=1 SCAR=0.0
Pod undocumented
37 16 my $self = shift;
38  
39 16 my $val = shift;
40  
41 16 return "array with $val element(s)"
42 }
43  
44 sub renderGot
45 8 ▶{
Subroutine renderGot: called CC=1 SCAR=0.0
Pod undocumented
46 8 my $self = shift;
47  
48 8 my $got = shift;
49  
50 8 return $self->renderVal(@$got + 0);
51 }
52  
53 sub renderExp
54 8 ▶{
Subroutine renderExp: called CC=1 SCAR=0.0
Pod undocumented
55 8 my $self = shift;
56  
57 8 return $self->renderVal($self->{val});
58 }
59  
60 18 1;
61  
62 __END__
« Deep/Blessed.pm ↑ Summary Deep/RegexpRefOnly.pm »