Branch Coverage

blib/lib/Struct/Path.pm
Criterion Covered Total %
branch 106 106 100.0


line true false branch
120 2 6 if (ref $_[0] eq 'ARRAY') { }
5 1 elsif (ref $_[0] eq 'HASH') { }
121 1 1 unless @{$_[0];}
123 1 4 if exists $_[0]{'R'} and @{$_[0]{'R'};}
124 1 3 unless exists $_[0]{'K'}
125 1 2 unless @{$_[0]{'K'};}
156 4 3 defined $opts{'depth'} ? :
159 18 48 if (ref ${$ref;} eq 'HASH' and @{$path;} != $depth and keys %{${$ref;};}) { }
9 39 elsif (ref ${$ref;} eq 'ARRAY' and @{$path;} != $depth and @{${$ref;};}) { }
221 1 69 unless ref $path eq 'ARRAY'
223 1 68 if $opts{'delete'} and not @{$path;}
231 70 87 if (ref $step eq 'ARRAY') { }
77 10 elsif (ref $step eq 'HASH') { }
9 1 elsif (ref $step eq 'CODE') { }
232 17 53 if (ref ${$refs->[-1];} ne 'ARRAY')
234 2 15 if $opts{'strict'}
235 8 7 unless $opts{'expand'}
239 49 11 @{$step;} ? :
241 66 5 $_ >= 0 ? :
7 78 unless ($opts{'expand'} or @{${$refs->[-1];};} > ($_ >= 0 ? $_ : abs $_ + 1))
245 2 5 if $opts{'strict'}
249 6 72 if ($_ < 0)
250 3 3 if (@{${$refs->[-1];};} < abs $_) { }
261 9 49 if ($opts{'delete'} and $sc == $#{$path;})
262 13 2 if $_ < @{${$refs->[-1];};}
266 9 68 if (ref ${$refs->[-1];} ne 'HASH')
268 2 7 if $opts{'strict'}
269 3 4 unless $opts{'expand'}
274 1 71 if @types != keys %{$step;}
278 2 62 unless (ref $step->{$t} eq 'ARRAY')
279 1 1 $t eq 'K' ? :
283 54 8 if ($t eq 'K') { }
285 6 38 unless ($opts{'expand'} or exists ${$$refs[-1];}->{$_})
286 1 5 if $opts{'strict'}
298 60 8 @types ? :
300 8 71 if $opts{'delete'} and $sc == $#{$path;}
305 6 3 if &$step($steps, $refs)
317 7 67 if exists $opts{'assign'}
319 2 72 if ($opts{'stack'}) { }
320 1 1 if $opts{'deref'}
322 5 67 $opts{'deref'} ? :
325 8 66 $opts{'paths'} ? :
343 1 15 unless ref $scnd eq 'ARRAY'
344 1 14 unless defined $frst
345 1 13 unless ref $frst eq 'ARRAY'
353 10 21 if (ref $frst->[$i] eq 'ARRAY') { }
18 3 elsif (ref $frst->[$i] eq 'HASH') { }
2 1 elsif (ref $frst->[$i] eq 'CODE') { }
354 2 8 unless @{$frst->[$i];} == @{$scnd->[$i];}
356 1 14 unless $frst->[$i][$_] == $scnd->[$i][$_]
359 2 16 unless @{$frst->[$i]{'K'};} == @{$scnd->[$i]{'K'};}
363 2 19 unless $frst->[$i]{'K'}[$_] eq $scnd->[$i]{'K'}[$_]
368 1 1 unless $deparse->coderef2text($frst->[$i]) eq $deparse->coderef2text($scnd->[$i])