Branch Coverage

blib/lib/XML/Filter/Cache/File.pm
Criterion Covered Total %
branch 10 30 33.3


line true false branch
18 3 0 @_ == 1 ? :
35 2 2 if ($mode eq 'w') { }
2 0 elsif ($mode eq 'r') { }
36 0 2 unless (CORE::open $fh, ">$filename")
37 0 0 unless (-e $cacheroot)
38 0 0 unless (mkdir $cacheroot, 511)
43 0 0 unless (-e 'File::Spec'->catdir($cacheroot, $primary))
44 0 0 unless (mkdir 'File::Spec'->catdir($cacheroot, $primary), 511)
49 0 0 unless (-e 'File::Spec'->catdir($cacheroot, $primary, $secondary))
50 0 0 unless (mkdir 'File::Spec'->catdir($cacheroot, $primary, $secondary), 511)
55 0 0 unless CORE::open $fh, ">$filename"
62 0 2 unless CORE::open $fh, "<$filename"
77 2 1345 if eof $fh
79 0 1345 if (read($fh, $buff, 4) != 4)
83 0 1345 if (read($fh, $buff, $length) != $length)