Branch Coverage

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


line true false branch
170 53 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 16 216 if $check =~ qr/^l?stat$/
221 0 246 unless defined $check
222 0 246 unless ref $sub eq "CODE"
226 0 246 unless defined $MAP_FC_OP{$check}
229 1 245 if exists $_current_mocks->{$optype}
242 0 115 unless defined $check
244 0 115 unless defined $MAP_FC_OP{$check}
291 278 39 if $check =~ qr/^[sfdMXxzACORWeorw]$/
293 278 39 $can_use_stat ? :
296 1 316 if (scalar @mocked_lstat_result == 1 and not ref $mocked_lstat_result[0] and $mocked_lstat_result[0] == -1)
310 277 39 if ($can_use_stat) { }
312 277 0 if defined $f_or_fh
316 39 0 if defined $f_or_fh
319 19 297 if ($check eq 'r') { }
19 278 elsif ($check eq 'w') { }
13 265 elsif ($check eq 'x') { }
19 246 elsif ($check eq 'o') { }
19 227 elsif ($check eq 'R') { }
19 208 elsif ($check eq 'W') { }
12 196 elsif ($check eq 'X') { }
19 177 elsif ($check eq 'O') { }
35 142 elsif ($check eq 'e') { }
7 135 elsif ($check eq 'z') { }
18 117 elsif ($check eq 's') { }
20 97 elsif ($check eq 'f') { }
36 61 elsif ($check eq 'd') { }
9 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 228 37 $s ? :
526 1 74 unless defined $mode
534 0 8 unless ref $sub eq "CODE"
538 0 16 unless $optype
560 7 2 unless (scalar %REVERSE_MAP)
567 0 9 unless scalar @mocks
580 0 1189 if scalar @others
583 0 1189 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 1083 if (defined $out and $OP_CAN_RETURN_INT{$optype})
595 195 888 unless ($out)
600 23 172 unless (int $!)
608 137 751 if not ref $out and $out == -1
611 347 404 if ($OP_IS_STAT_OR_LSTAT{$optype})
631 2 345 unless $stat_is_a
637 339 6 if ($stat_is_a eq 'ARRAY') { }
6 0 elsif ($stat_is_a eq 'HASH') { }
640 4 335 if ($av_size and $av_size != $stat_t_max)
651 2 7 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}