Branch Coverage

blib/lib/DiaColloDB/EnumFile.pm
Criterion Covered Total %
branch 0 172 0.0


line true false branch
84 0 0 defined $enum->{'base'} ? :
88 0 0 if $_[0]->opened
96 0 0 if UNIVERSAL::isa($enum, $class) or not $force and UNIVERSAL::isa((ref $enum || $enum) . '::MMap', $class)
98 0 0 unless ref $enum
99 0 0 UNIVERSAL::can($class, 'new') ? :
117 0 0 if $enum->opened
120 0 0 if (fcread($flags) and not fctrunc($flags))
121 0 0 unless $enum->loadHeader
124 0 0 if $enum->{'hclass'} and not $enum->isa($enum->{'hclass'})
128 0 0 unless $enum->{'sfh'} = fcopen("$base.es", $flags, $enum->{'perms'})
130 0 0 unless $enum->{'ixfh'} = fcopen("$base.eix", $flags, $enum->{'perms'})
132 0 0 unless $enum->{'sxfh'} = fcopen("$base.esx", $flags, $enum->{'perms'})
151 0 0 if ($enum->opened and fcwrite($enum->{'flags'}))
152 0 0 unless $enum->flush
154 0 0 unless ($enum->{'shared'})
155 0 0 unless not defined $enum->{'sxfh'} or $enum->{'sxfh'}->close
156 0 0 unless not defined $enum->{'ixfh'} or $enum->{'ixfh'}->close
157 0 0 unless not defined $enum->{'sfh'} or $enum->{'sfh'}->close
225 0 0 unless $enum->opened and fcwrite($enum->{'flags'})
226 0 0 unless $force or $enum->dirty
229 0 0 unless $enum->saveHeader
249 0 0 if $utf8 and utf8::is_utf8($s)
250 0 0 unless $sfh->print(pack("$pack_l/A", $s))
252 0 0 unless $ixfh->print(pack($pack_o, $off))
264 0 0 unless $sxfh->print(pack($pack_sx, $i2off->[$i], $i))
271 0 0 unless (caller 1)[3] =~ /::close$/
283 0 0 if $enum->loaded or not $enum->opened
291 0 0 unless read($sfh, $buf, $len_l) == $len_l
295 0 0 unless read($sfh, $buf, $len_s) == $len_s
299 0 0 if $enum->dirty
310 0 0 unless defined $_
334 0 0 if ($e2->opened and not $e2->loaded) { }
351 0 0 unless $enum->fromArray($enum->toArray)
362 0 0 if defined $base
363 0 0 unless $enum->opened
364 0 0 unless $enum->flush
384 0 0 if (not defined $hdr || fccreat($enum->{'flags'})) { }
0 0 elsif (defined $hdr) { }
413 0 0 unless ref $enum
414 0 0 exists $opts{'pack_s'} ? :
415 0 0 $pack_s && !UNIVERSAL::isa($pack_s, 'CODE') ? :
420 0 0 if /^%%/ or /^$/
422 0 0 if $packsub
440 0 0 exists $opts{'pack_s'} ? :
441 0 0 $pack_s && !UNIVERSAL::isa($pack_s, 'CODE') ? :
445 0 0 if (defined $_)
446 0 0 $packsub ? :
471 0 0 UNIVERSAL::isa($_[0], 'ARRAY') ? :
476 0 0 if exists $s2i->{$_}
490 0 0 UNIVERSAL::isa($_[0], 'ARRAY') ? :
507 0 0 defined $e2 ? :
517 0 0 if $i >= $enum->{'size'}
519 0 0 if defined($buf = $enum->{'i2s'}[$i])
521 0 0 unless seek $enum->{'ixfh'}, $i * $enum->{'len_o'}, 0
524 0 0 unless read($enum->{'ixfh'}, $buf, $enum->{'len_o'}) == $enum->{'len_o'}
527 0 0 unless seek $enum->{'sfh'}, $soff, 0
530 0 0 unless read($enum->{'sfh'}, $buf, $enum->{'len_l'}) == $enum->{'len_l'}
533 0 0 unless read($enum->{'sfh'}, $buf, $slen) == $slen
536 0 0 if $enum->{'utf8'}
548 0 0 $enum->{'dirty'} ? :
551 0 0 if defined($buf = $enum->{'s2i'}{$key})
553 0 0 if $enum->{'utf8'} and utf8::is_utf8($key)
558 0 0 unless seek $sxfh, $imid * $len_sx, 0
560 0 0 unless read($sxfh, $buf, $len_o) == $len_o
565 0 0 unless seek $sfh, $soff, 0
567 0 0 unless read($sfh, $buf, $len_l) == $len_l
570 0 0 unless read($sfh, $buf, $slen) == $slen
573 0 0 if ($buf lt $key) { }
581 0 0 if ($ilo == $ihi)
583 0 0 unless seek $sxfh, $ilo * $len_sx, 0
585 0 0 if $sxfh->eof
586 0 0 unless read($sxfh, $buf, $len_sx) == $len_sx
591 0 0 unless seek $sfh, $soff, 0
593 0 0 unless read($sfh, $buf, $len_l) == $len_l
596 0 0 unless read($sfh, $buf, $slen) == $slen
599 0 0 if $buf eq $key
611 0 0 unless (ref $re)
612 0 0 if $utf8 and not utf8::is_utf8($re)
617 0 0 if ($enum->loaded or not $enum->opened)
619 0 0 if $utf8
631 0 0 unless read($sfh, $buf, $len_l) == $len_l
635 0 0 unless read($sfh, $buf, $len_s) == $len_s
638 0 0 if $utf8
639 0 0 if $buf =~ /$re/
642 0 0 if $utf8
0 0 if $enum->dirty