Branch Coverage

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


line true false branch
181 146 1 unless exists $opts{'freezer'}
193 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)) { }
194 9 1 unless $opts{'noO'}
195 9 1 unless $opts{'noN'}
199 5 81 if ($stat->{'U'} * 3 == @{$lcs;}) { }
200 3 2 unless $opts{'noU'}
207 110 128 if ($op eq 'U') { }
67 61 elsif ($op eq 'D') { }
32 29 elsif ($op eq 'A') { }
208 44 66 if ($opts{'noU'})
212 6 61 unless (keys %{$sd;})
215 6 26 if ($opts{'noA'})
218 4 25 if ($opts{'noR'})
219 2 23 $opts{'trimR'} ? :
222 32 146 if ($I)
230 1 1 $opts{'noU'} ? :
2 63 unless @keys
233 75 30 if (exists $x->{$k} and exists $y->{$k}) { }
17 13 elsif (exists $x->{$k}) { }
234 25 50 if ($opts{'freezer'}->($x->{$k}) eq $opts{'freezer'}->($y->{$k})) { }
235 17 8 unless $opts{'noU'}
238 48 2 if keys %{$sd;}
242 2 13 $opts{'trimR'} ? :
15 2 unless $opts{'noR'}
244 11 2 unless $opts{'noA'}
248 12 2 if (exists $d->{'U'} and exists $d->{'D'})
253 16 2 unless $opts{'noU'}
255 73 12 unless $opts{'noO'}
256 77 8 unless $opts{'noN'}
271 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]) { }
287 48 38 if exists $stat{'N'}
330 18 18 if (not exists ${$diff;}->{'D'} or $opts{'depth'} and @{$path;} >= $opts{'depth'}) { }
8 10 elsif (ref ${$diff;}->{'D'} eq 'ARRAY') { }
335 1 13 if exists $_->{'I'}
346 1 1 ref $opts{'sort'} eq 'CODE' ? :
2 8 $opts{'sort'} ? :
368 14 43 if (exists $d->{'D'}) { }
14 29 elsif (exists $d->{'U'}) { }
6 23 elsif (exists $d->{'A'}) { }
6 17 elsif (exists $d->{'R'}) { }
369 8 6 if (ref $d->{'D'} eq 'ARRAY') { }
372 19 1 if exists $sd->{'a'}
373 19 1 if exists $sd->{'b'}
378 22 5 if exists $sd->{'a'}
379 22 5 if exists $sd->{'b'}
389 16 1 if exists $d->{'N'}
390 16 1 if exists $d->{'O'}
410 83 86 if (exists $d->{'D'}) { }
61 25 elsif (exists $d->{'N'}) { }
411 1 82 unless ref ${$s;} eq ref $d->{'D'}
413 50 32 if (ref $d->{'D'} eq 'ARRAY') { }
417 20 102 if exists $_->{'I'}
419 37 85 if (exists $_->{'D'} or exists $_->{'N'}) { }
25 60 elsif (exists $_->{'A'}) { }
24 36 elsif (exists $_->{'R'}) { }
434 20 22 if (exists $v->{'D'} or exists $v->{'N'}) { }
6 16 elsif (exists $v->{'A'}) { }
10 6 elsif (exists $v->{'R'}) { }
471 5 337 unless (ref $diff eq 'HASH')
472 1 4 unless wantarray
477 104 233 if (exists $diff->{'D'})
478 62 42 if (ref $diff->{'D'} eq 'ARRAY') { }
35 7 elsif (ref $diff->{'D'} eq 'HASH') { }
487 1 6 unless wantarray
492 37 299 if (exists $diff->{'I'})
493 6 31 if (not &looks_like_number($diff->{'I'}) or int $diff->{'I'} != $diff->{'I'})
494 1 5 unless wantarray
498 2 34 if (keys %{$diff;} < 2)
499 1 1 unless wantarray
505 9 130 wantarray ? :