Branch Coverage

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


line true false branch
121 2 6 if (ref $_[0] eq 'ARRAY') { }
5 1 elsif (ref $_[0] eq 'HASH') { }
122 1 1 unless @{$_[0];}
124 1 4 unless exists $_[0]{'K'}
125 1 3 unless @{$_[0]{'K'};}
157 4 3 defined $opts{'depth'} ? :
160 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;};}) { }
222 1 70 unless ref $init_path eq 'ARRAY'
224 1 69 if $opts{'delete'} and not @{$init_path;}
231 1 232 if (not ref $refs->[-1]) { }
74 158 elsif (not @{$rest;}) { }
234 7 67 if exists $opts{'assign'}
236 2 72 if ($opts{'stack'}) { }
237 1 1 if $opts{'deref'}
239 5 67 $opts{'deref'} ? :
242 8 66 $opts{'paths'} ? :
250 77 81 if (($step_type = ref $step) eq 'HASH') { }
70 11 elsif ($step_type eq 'ARRAY') { }
10 1 elsif ($step_type eq 'CODE') { }
251 9 68 if (ref ${$refs->[-1];} ne 'HASH')
253 2 7 if $opts{'strict'}
254 3 4 unless $opts{'expand'}
260 63 9 if (exists $step->{'K'}) { }
262 1 62 if keys %{$step;} > 1
264 1 61 unless ref $step->{'K'} eq 'ARRAY'
267 9 58 if (ref $i eq 'Regexp') { }
270 6 38 unless ($opts{'expand'} or exists ${$$refs[-1];}->{$i})
272 1 5 if $opts{'strict'}
280 1 8 if keys %{$step;}
283 60 8 exists $step->{'K'} ? :
290 8 71 if $opts{'delete'} and not @{$rest;}
293 17 53 if (ref ${$refs->[-1];} ne 'ARRAY')
295 2 15 if $opts{'strict'}
296 8 7 unless $opts{'expand'}
300 49 11 @{$step;} ? :
302 66 5 $_ >= 0 ? :
7 78 unless ($opts{'expand'} or @{${$refs->[-1];};} > ($_ >= 0 ? $_ : abs $_ + 1))
306 2 5 if $opts{'strict'}
310 6 72 if ($_ < 0)
311 3 3 if (@{${$refs->[-1];};} < abs $_) { }
325 9 49 if ($opts{'delete'} and not @{$rest;})
328 13 2 if $_ < @{${$refs->[-1];};}
336 7 3 if &$step($path, $refs, $rest)
357 1 15 unless ref $scnd eq 'ARRAY'
358 1 14 unless defined $frst
359 1 13 unless ref $frst eq 'ARRAY'
367 10 21 if (ref $frst->[$i] eq 'ARRAY') { }
18 3 elsif (ref $frst->[$i] eq 'HASH') { }
2 1 elsif (ref $frst->[$i] eq 'CODE') { }
368 2 8 unless @{$frst->[$i];} == @{$scnd->[$i];}
370 1 14 unless $frst->[$i][$_] == $scnd->[$i][$_]
373 2 16 unless @{$frst->[$i]{'K'};} == @{$scnd->[$i]{'K'};}
377 2 19 unless $frst->[$i]{'K'}[$_] eq $scnd->[$i]{'K'}[$_]
382 1 1 unless $deparse->coderef2text($frst->[$i]) eq $deparse->coderef2text($scnd->[$i])