Branch Coverage

blib/lib/Struct/Diff.pm
Criterion Covered Total %
branch 148 148 100.0


line true false branch
177 146 1 unless exists $opts{'freezer'}
189 10 254 if ($type ne ref $y) { }
86 168 elsif ($type eq 'ARRAY' and $x != $y) { }
65 103 elsif ($type eq 'HASH' and $x != $y) { }
18 85 elsif ($type and $x == $y or $opts{'freezer'}->($x) eq $opts{'freezer'}($y)) { }
190 9 1 unless $opts{'noO'}
191 9 1 unless $opts{'noN'}
195 5 81 if ($stat->{'U'} * 3 == @{$lcs;}) { }
196 3 2 unless $opts{'noU'}
203 110 128 if ($op eq 'U') { }
67 61 elsif ($op eq 'D') { }
32 29 elsif ($op eq 'A') { }
204 44 66 if ($opts{'noU'})
208 6 61 unless (keys %{$sd;})
211 6 26 if ($opts{'noA'})
214 4 25 if ($opts{'noR'})
215 2 23 $opts{'trimR'} ? :
218 32 146 if ($I)
226 1 1 $opts{'noU'} ? :
2 63 unless @keys
229 75 30 if (exists $x->{$k} and exists $y->{$k}) { }
17 13 elsif (exists $x->{$k}) { }
230 25 50 if ($opts{'freezer'}->($x->{$k}) eq $opts{'freezer'}->($y->{$k})) { }
231 17 8 unless $opts{'noU'}
234 48 2 if keys %{$sd;}
238 2 13 $opts{'trimR'} ? :
15 2 unless $opts{'noR'}
240 11 2 unless $opts{'noA'}
244 12 2 if (exists $d->{'U'} and exists $d->{'D'})
249 16 2 unless $opts{'noU'}
251 73 12 unless $opts{'noO'}
252 77 8 unless $opts{'noN'}
267 199 128 if ($xi == $xm->[0] and $yi == $ym->[0]) { }
67 61 elsif ($xi < $xm->[0] and $yi < $ym->[0]) { }
29 32 elsif ($xi < $xm->[0]) { }
283 48 38 if exists $stat{'N'}
326 18 18 if (not exists ${$diff;}->{'D'} or $opts{'depth'} and @{$path;} >= $opts{'depth'}) { }
8 10 elsif (ref ${$diff;}->{'D'} eq 'ARRAY') { }
331 1 13 if exists $_->{'I'}
342 1 1 ref $opts{'sort'} eq 'CODE' ? :
2 8 $opts{'sort'} ? :
364 14 43 if (exists $d->{'D'}) { }
14 29 elsif (exists $d->{'U'}) { }
6 23 elsif (exists $d->{'A'}) { }
6 17 elsif (exists $d->{'R'}) { }
365 8 6 if (ref $d->{'D'} eq 'ARRAY') { }
368 19 1 if exists $sd->{'a'}
369 19 1 if exists $sd->{'b'}
374 22 5 if exists $sd->{'a'}
375 22 5 if exists $sd->{'b'}
385 16 1 if exists $d->{'N'}
386 16 1 if exists $d->{'O'}
406 82 86 if (exists $d->{'D'}) { }
61 25 elsif (exists $d->{'N'}) { }
407 50 32 if (ref $d->{'D'} eq 'ARRAY') { }
411 20 102 if exists $_->{'I'}
413 37 85 if (exists $_->{'D'} or exists $_->{'N'}) { }
25 60 elsif (exists $_->{'A'}) { }
24 36 elsif (exists $_->{'R'}) { }
428 20 22 if (exists $v->{'D'} or exists $v->{'N'}) { }
6 16 elsif (exists $v->{'A'}) { }
10 6 elsif (exists $v->{'R'}) { }
464 5 335 unless (ref $diff eq 'HASH')
465 1 4 unless wantarray
470 103 232 if (exists $diff->{'D'})
471 61 42 if (ref $diff->{'D'} eq 'ARRAY') { }
35 7 elsif (ref $diff->{'D'} eq 'HASH') { }
480 1 6 unless wantarray
485 37 297 if (exists $diff->{'I'})
486 6 31 if (not &looks_like_number($diff->{'I'}) or int $diff->{'I'} != $diff->{'I'})
487 1 5 unless wantarray
491 2 34 if (keys %{$diff;} < 2)
492 1 1 unless wantarray
498 9 129 wantarray ? :