Condition Coverage

blib/lib/Tie/File/Indexed.pm
Criterion Covered Total %
condition 51 110 46.3


and 3 conditions

line !l l&&!r l&&r condition
103 2 2 13 $fwrite and not $fappend
177 6 27 11 fcwrite($flags) and not fctrunc($flags)
438 0 13 8 fcread($mode) and not fctrunc($mode)
439 8 0 0 not -e "$file.hdr" and fccreat($mode)
465 0 2 18 $tied->opened and fcwrite($tied->{'mode'})
480 0 0 2 $tied->opened && $tied->close && $tied->open($file, $mode)
490 32 0 53 ref $tied && defined $tied->{'idxfh'} && defined $tied->{'datfh'}
502 0 0 5 $rc and UNIVERSAL::can($tied->{'idxfh'}, 'flush')
0 0 5 $rc and UNIVERSAL::can($tied->{'idxfh'}, 'flush') and UNIVERSAL::can($tied, 'flush')
504 0 5 0 $tied->{'idxfh'}->flush && $tied->{'datfh'}->flush && (!$flushHeader || $tied->saveHeaderFile)
539 0 1 0 $tied->opened and fcwrite($flags)
0 1 0 $tied->opened and fcwrite($flags) and $tied->close
554 0 2 0 $src->opened and $src->flush
574 0 1 0 $tied->opened and fcwrite($flags)
0 1 0 $tied->opened and fcwrite($flags) and $tied->close

or 2 conditions

line l !l condition
94 384 0 $mode //= 'r'
269 0 0 $tied->slurpIndex // ''
295 24 0 $_[1] // ''
342 0 4 $tied->{'bsize'} // 2097152
655 0 0 $op // 2
662 0 0 $_[1] // 0
836 2 0 truncate $tied->{'idxfh'}, ($size + $shift) * $tied->{'len_ix'} or return undef

or 3 conditions

line l !l&&r !l&&!r condition
53 1 16 0 ref $that || $that
98 2 0 15 $mode =~ /[a]/ || $mode =~ />>/
112 65 0 0 ($flags & 0) == 0 || ($flags & 2) == 2
120 0 96 14 ($flags & 1) == 1 || ($flags & 2) == 2
162 44 0 0 $perms //= 438 & ~(umask)
243 0 0 0 ref $that || $that
316 0 133 0 not defined $_[1] or seek $_[0]{'idxfh'}, $_[1] * $_[0]{'len_ix'}, 0
327 1 74 0 not defined $_[1] or seek $_[0]{'idxfh'}, $_[1] * $_[0]{'len_ix'}, 0
388 37 54 134 ref $_[0]{$_} || $_ =~ /^(?:file|mode|perms)$/
404 0 8 0 $hfile //= $tied->{'file'} . '.hdr'
418 0 18 0 $hfile //= $tied->{'file'} . '.hdr'
432 4 17 0 $file //= $tied->{'file'}
433 4 17 0 $mode //= $tied->{'mode'}
439 0 8 0 not -e "$file.hdr" and fccreat($mode) or $tied->loadHeader
522 0 10 1 $file //= $tied->{'file'}
556 2 0 0 $dst->opened or $dst->open($opts{'file'}, 'rw')
595 0 1 0 $tmpfile //= "$tied->{'file'}.tmp"