Branch Coverage

blib/lib/Overload/FileCheck.pm
Criterion Covered Total %
branch 124 146 84.9


line true false branch
170 56 2 unless ($_next_check or $check =~ qr/^-/)
176 2 2 if (not $_next_check) { }
186 1 1 if ($_next_check eq '-from_stat' or $_next_check eq '-from-stat') { }
205 18 243 if $check =~ qr/^l?stat$/
221 0 273 unless defined $check
222 0 273 unless ref $sub eq "CODE"
226 0 273 unless defined $MAP_FC_OP{$check}
229 1 272 if exists $_current_mocks->{$optype}
242 0 144 unless defined $check
244 0 144 unless defined $MAP_FC_OP{$check}
291 283 43 if $check =~ qr/^[sfdMXxzACORWeorw]$/
293 283 43 $can_use_stat ? :
296 1 325 if (scalar @mocked_lstat_result == 1 and not ref $mocked_lstat_result[0] and $mocked_lstat_result[0] == -1)
310 282 43 if ($can_use_stat) { }
312 282 0 if defined $f_or_fh
316 43 0 if defined $f_or_fh
319 19 306 if ($check eq 'r') { }
19 287 elsif ($check eq 'w') { }
13 274 elsif ($check eq 'x') { }
19 255 elsif ($check eq 'o') { }
19 236 elsif ($check eq 'R') { }
19 217 elsif ($check eq 'W') { }
12 205 elsif ($check eq 'X') { }
19 186 elsif ($check eq 'O') { }
39 147 elsif ($check eq 'e') { }
7 140 elsif ($check eq 'z') { }
18 122 elsif ($check eq 's') { }
21 101 elsif ($check eq 'f') { }
36 65 elsif ($check eq 'd') { }
13 52 elsif ($check eq 'l') { }
1 51 elsif ($check eq 'p') { }
5 46 elsif ($check eq 'S') { }
2 44 elsif ($check eq 'b') { }
2 42 elsif ($check eq 'c') { }
0 42 elsif ($check eq 't') { }
0 42 elsif ($check eq 'u') { }
0 42 elsif ($check eq 'g') { }
1 41 elsif ($check eq 'k') { }
5 36 elsif ($check eq 'T') { }
14 22 elsif ($check eq 'B') { }
7 15 elsif ($check eq 'M') { }
8 7 elsif ($check eq 'A') { }
7 0 elsif ($check eq 'C') { }
473 10 4 if -d $f_or_fh
485 0 7 unless scalar @stat and defined $stat[9]
495 0 8 unless scalar @stat and defined $stat[8]
504 0 7 unless scalar @stat and defined $stat[10]
520 232 40 $s ? :
526 3 77 unless defined $mode
534 0 9 unless ref $sub eq "CODE"
538 0 18 unless $optype
560 8 2 unless (scalar %REVERSE_MAP)
567 0 10 unless scalar @mocks
580 0 1207 if scalar @others
583 0 1207 unless defined $_current_mocks->{$optype}
585 2 0 if not defined $file and defined $_last_call_for and not defined $$_current_mocks{$MAP_FC_OP{'stat'}}
591 106 1101 if (defined $out and $OP_CAN_RETURN_INT{$optype})
595 200 901 unless ($out)
600 23 177 unless (int $!)
608 137 764 if not ref $out and $out == -1
611 356 408 if ($OP_IS_STAT_OR_LSTAT{$optype})
631 2 354 unless $stat_is_a
637 348 6 if ($stat_is_a eq 'ARRAY') { }
6 0 elsif ($stat_is_a eq 'HASH') { }
640 4 344 if ($av_size and $av_size != $stat_t_max)
651 2 8 unless defined $ix
716 26 0 if (defined $type)
723 2 24 if (defined $opts->{'perms'})
730 2 24 if (defined $opts->{'uid'})
731 1 1 if ($opts->{'uid'} =~ qr/^[0-9]+$/) { }
740 2 24 if (defined $opts->{'gid'})
741 1 1 if ($opts->{'gid'} =~ qr/^[0-9]+$/) { }
762 6 14 unless defined $name2ix{$k}