Branch Coverage

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


line true false branch
181 150 1 unless exists $opts{'freezer'}
193 10 258 if ($type ne ref $y) { }
88 170 elsif ($type eq 'ARRAY' and $x != $y) { }
67 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 83 if ($stat->{'U'} * 3 == @{$lcs;}) { }
200 3 2 unless $opts{'noU'}
207 110 130 if ($op eq 'U') { }
67 63 elsif ($op eq 'D') { }
33 30 elsif ($op eq 'A') { }
208 44 66 if ($opts{'noU'})
212 6 61 unless (keys %{$sd;})
215 6 27 if ($opts{'noA'})
218 4 26 if ($opts{'noR'})
219 2 24 $opts{'trimR'} ? :
222 32 148 if ($I)
230 1 1 $opts{'noU'} ? :
2 65 unless @keys
233 75 32 if (exists $x->{$k} and exists $y->{$k}) { }
18 14 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 14 $opts{'trimR'} ? :
16 2 unless $opts{'noR'}
244 12 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 201 130 if ($xi == $xm->[0] and $yi == $ym->[0]) { }
67 63 elsif ($xi < $xm->[0] and $yi < $ym->[0]) { }
30 33 elsif ($xi < $xm->[0]) { }
287 48 40 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 18 47 if (exists $d->{'D'}) { }
14 33 elsif (exists $d->{'U'}) { }
8 25 elsif (exists $d->{'A'}) { }
8 17 elsif (exists $d->{'R'}) { }
369 10 8 if (ref $d->{'D'} eq 'ARRAY') { }
372 20 2 if exists $sd->{'a'}
373 20 2 if exists $sd->{'b'}
376 1 9 unless exists $out{'a'}
377 1 9 unless exists $out{'b'}
381 23 6 if exists $sd->{'a'}
382 23 6 if exists $sd->{'b'}
385 1 7 unless exists $out{'a'}
386 1 7 unless exists $out{'b'}
395 16 1 if exists $d->{'N'}
396 16 1 if exists $d->{'O'}
416 83 86 if (exists $d->{'D'}) { }
61 25 elsif (exists $d->{'N'}) { }
417 1 82 unless ref ${$s;} eq ref $d->{'D'}
419 50 32 if (ref $d->{'D'} eq 'ARRAY') { }
423 20 102 if exists $_->{'I'}
425 37 85 if (exists $_->{'D'} or exists $_->{'N'}) { }
25 60 elsif (exists $_->{'A'}) { }
24 36 elsif (exists $_->{'R'}) { }
440 20 22 if (exists $v->{'D'} or exists $v->{'N'}) { }
6 16 elsif (exists $v->{'A'}) { }
10 6 elsif (exists $v->{'R'}) { }
477 5 337 unless (ref $diff eq 'HASH')
478 1 4 unless wantarray
483 104 233 if (exists $diff->{'D'})
484 62 42 if (ref $diff->{'D'} eq 'ARRAY') { }
35 7 elsif (ref $diff->{'D'} eq 'HASH') { }
493 1 6 unless wantarray
498 37 299 if (exists $diff->{'I'})
499 6 31 if (not &looks_like_number($diff->{'I'}) or int $diff->{'I'} != $diff->{'I'})
500 1 5 unless wantarray
504 2 34 if (keys %{$diff;} < 2)
505 1 1 unless wantarray
511 9 130 wantarray ? :