Branch Coverage

blib/lib/Paranoid/IO.pm
Criterion Covered Total %
branch 141 214 65.8


line true false branch
125 248 0 if (defined $fh and ref $fh eq "GLOB")
127 138 0 if ($files{$_}{'fh'} eq $fh)
128 138 0 if $rv = $_
151 270 0 if (defined $filename)
154 10 260 if (ref $filename eq 'GLOB') { }
158 217 43 if exists $files{$filename}
162 223 47 if (defined $fh and fileno $fh)
168 264 6 if (defined $filename)
174 0 270 unless $rv
194 58 0 unless @files
196 0 16 unless &pclose($_)
219 261 0 if (defined $filename)
223 2 259 unless defined $mode
224 110 151 unless defined $perms
225 0 261 unless (&detaint(\$mode, "int"))
230 0 261 unless (&detaint(\$perms, "int"))
245 261 0 if ($rv)
246 261 0 if (&detaint(\$filename, 'filename', \$f)) { }
253 138 123 $tmp{'mode'} & 64 ? :
254 221 40 if ($rv) { }
287 22 0 if (defined $filename and exists $files{$filename})
294 22 0 fileno $fh ? :
299 22 0 if (&pclose($filename))
302 22 0 if $tmp{'mode'} & 704
306 22 0 if ($rv)
315 22 0 if $filename ne $tmp{'real'}
343 57659 0 if (defined $filename)
344 182 57477 if (ref $filename eq 'GLOB') { }
348 57238 239 if exists $files{$filename}
352 57364 295 if (defined $filename and exists $files{$filename}) { }
239 56 elsif (defined $filename) { }
56 0 elsif (not defined $filename and defined $fh) { }
355 57342 22 if ($files{$filename}{'pid'} == $$) { }
357 57342 0 if (fileno $fh) { }
368 0 0 if _reopen($filename)
375 22 0 if _reopen($filename)
382 199 40 if _open($filename, $mode, $perms)
388 52 4 fileno $fh ? :
412 0 0 unless @files
413 0 0 unless _reopen($_)
433 4148 0 if (defined $filename)
436 36 4112 if (ref $filename eq 'GLOB') { }
440 4112 0 if exists $files{$filename}
443 4148 0 if (defined $fh)
450 4148 0 if ($rv) { }
451 4116 32 if (defined $filename and exists $files{$filename}) { }
461 0 0 $lock & 4 ? :
491 20 31124 if ref $filename eq "GLOB"
495 31128 0 if defined $filename and exists $files{$filename}
496 31128 16 if (defined $ll) { }
503 1276 29852 unless exists $lstack{$filename}
508 0 31128 if defined $lsl and $lsl != $ll
517 15301 15827 if ($rl == 8) { }
11982 3845 elsif ($rl == 1) { }
3845 0 elsif ($rl == 2) { }
522 14047 1254 if (scalar @$stack) { }
526 0 14047 if ($ll != $stack->[-1])
544 10280 1702 if (defined $lsl and $lsl == 2)
549 11350 632 $ll == $rl ? :
550 11982 0 if $rv
554 3201 644 $ll == $rl ? :
560 29874 1254 if (scalar @$stack) { }
562 28598 1276 if ($ll == $stack->[-1]) { }
573 1254 29874 unless scalar @$stack
576 16 0 if (defined $fh and not defined $filename) { }
608 32746 0 if (defined $filename)
610 31144 1602 PIOLOCKSTACK() ? :
633 0 0 if (defined $filename)
636 0 0 if ref $filename eq "GLOB"
637 0 0 if (defined $filename and exists $files{$filename}) { }
666 597 0 if (defined $filename)
669 593 4 if (defined $fh)
671 0 593 unless $rv
696 11758 0 if (defined $filename)
699 11754 4 if (defined $fh)
700 0 11754 unless defined $whence
702 2 11752 unless $rv
727 2325 4 defined $out ? :
733 2321 8 if (defined $filename and defined $out and length $out)
740 2321 0 if (defined $fh)
741 2321 0 if ($nolock or pflock($filename, 2))
742 388 1933 unless defined $wlen
743 392 1929 unless defined $offset
745 2321 0 if (defined $rv) { }
752 2321 0 unless $nolock
796 520 0 if (defined $filename and defined $out and length $out)
802 520 0 if (defined $fh)
805 520 0 if ($nolock or pflock($filename, 2))
811 520 0 if ($pos and sysseek $fh, 0, 2)
814 520 0 unless defined $wlen
815 520 0 unless defined $offset
817 520 0 if (defined $rv) { }
830 520 0 unless $nolock
872 9423 0 if (defined $filename)
879 9417 6 if (defined $fh)
880 9417 0 if ($nolock or pflock($filename, 1))
881 421 8996 unless defined $rlen
882 9417 0 unless defined $offset
884 9413 4 if (defined $rv) { }
891 9415 2 unless $nolock
931 3 0 if (defined $filename)
932 3 0 unless defined $pos
936 3 0 if (defined $fh)
937 3 0 if ($nolock or pflock($filename, 2))
940 3 0 if ($rv) { }
941 0 3 if $cpos > $pos
946 3 0 unless $nolock