Branch Coverage

blib/lib/File/SAUCE.pm
Criterion Covered Total %
branch 46 64 71.8


line true false branch
266 31 14 if (exists $options{'file'} or exists $options{'string'} or exists $options{'handle'}) { }
274 1 13 if exists $options{'date'}
318 18 58 if (($file->stat)[7] < 128)
326 21 37 if (substr($buffer, 0, 5) ne 'SAUCE')
343 15 22 if ($comments > 0)
347 14 1 if (substr($buffer, 0, 5) eq 'COMNT')
375 2 4 if ref $file eq 'IO::String'
400 12 11 unless ($has_sauce)
401 4 8 if exists $options{'string'}
411 3 8 $comments ? :
416 7 4 if ($size =~ /^0|1$/) { }
417 1 6 unless $file->truncate($sizeinrec)
422 1 3 unless $file->truncate($sizeondisk - $saucesize - 1)
425 3 8 if ref $file eq 'IO::String'
448 4 5 if ($comments)
463 135 9 $field ne 'comments' ? :
484 0 0 if ($has_sauce == 0)
490 0 0 if (/^(datatype|filetype|flags)_id$/) { }
0 0 elsif (/^tinfo\d$/) { }
0 0 elsif ($_ eq 'date') { }
0 0 elsif ($_ eq 'comments') { }
494 0 0 if $value
502 0 0 if $value
524 0 0 unless @comments
532 0 0 $_ == 0 ? :
642 126 32 if ($date)
643 124 2 if ref $date eq 'Time::Piece'
645 2 124 if $date =~ /^\d{8}$/
667 36 59 if (exists $options{'file'}) { }
28 31 elsif (exists $options{'string'}) { }
30 1 elsif (exists $options{'handle'}) { }
668 1 35 unless $file = 'FileHandle'->new($options{'file'}, $perms)