| 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
Condition33%1/3
ref $got and builtin::reftype($got) eq "ARRAY"
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"
| |||||||||||||||||||||||||||||
| 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__ | ||||||||||||||||||||||||||||