Branch Coverage

blib/lib/Filesys/POSIX/Mem/Bucket.pm
Criterion Covered Total %
branch 58 58 100.0


line true false branch
45 7 66 defined $opts{'max'} ? :
5 68 defined $opts{'dir'} ? :
59 3 9 if $$self{'fh'}
61 4 8 if ($$self{'file'} and -f $$self{'file'})
70 1 96 if $$self{'fh'}
74 4 92 if ($flags & $Filesys::POSIX::Mem::Bucket::O_APPEND) { }
73 19 elsif ($flags & ($Filesys::POSIX::Mem::Bucket::O_CREAT | $Filesys::POSIX::Mem::Bucket::O_TRUNC)) { }
85 5 91 if ($$self{'file'})
88 1 4 unless sysopen my $fh, $$self{'file'}, $fcntl_flags
99 1 7 if $$self{'file'}
104 1 6 if $@
109 127 1 $left > $len ? :
128 72 667 if ($$self{'pos'} + $len > $$self{'max'})
129 7 65 unless $$self{'fh'}
132 71 667 if ($$self{'fh'}) { }
133 1 70 unless fileno $$self{'fh'}
138 1 666 if ((my $gap = $$self{'pos'} - $$self{'size'}) > 0)
150 1 736 if ($$self{'pos'} > $$self{'size'})
164 198 18 if ($$self{'fh'}) { }
165 1 197 unless fileno $$self{'fh'}
170 1 17 $$self{'pos'} > $$self{'size'} ? :
173 4 14 if $len > $maxlen
175 4 14 unless ($len)
193 5 9 if ($$self{'fh'}) { }
6 3 elsif ($whence == $Filesys::POSIX::Mem::Bucket::SEEK_SET) { }
1 2 elsif ($whence == $Filesys::POSIX::Mem::Bucket::SEEK_CUR) { }
1 1 elsif ($whence == $Filesys::POSIX::Mem::Bucket::SEEK_END) { }
215 1 4 if ($$self{'fh'})
225 7 71 if ($$self{'fh'})