Branch Coverage

blib/lib/Tie/Persistent.pm
Criterion Covered Total %
branch 71 152 46.7


line true false branch
353 1 0 if ($Has_Storable) { }
356 0 0 if $^W
397 0 6 if $] < 5.005
435 0 64 unless defined $file
442 64 0 if ($mode =~ /[ra+]/)
444 6 58 if (not -f $file) { }
446 0 6 unless $mode =~ /[w+]/
450 14 44 if ($mode =~ /[w+a]/)
452 0 14 unless -w $fdir
454 0 14 if -f $file and not -w $file
460 29 29 unless (defined $Tie::Persistent::PersistentData)
462 0 29 unless open FILE, $file
467 0 29 if substr($firstline, 0, 15) ne '$PersistentData'
472 0 58 if $@
474 0 58 unless defined ref $Tie::Persistent::PersistentData
482 2 62 if (defined $other)
483 2 0 if (ref $other) { }
484 0 2 unless ref $other eq $type
495 58 6 if (defined $Tie::Persistent::PersistentData)
498 0 58 if $dataref ne $datatype
503 16 48 if ($type eq 'HASH') { }
6 42 elsif ($type eq 'ARRAY') { }
42 0 elsif ($type eq 'SCALAR') { }
505 2 14 if ($$self[0]) { }
510 0 14 if defined $objtype
516 0 6 if ($$self[0]) { }
521 0 6 if defined $objtype
527 0 42 if ($$self[0]) { }
532 0 42 if defined $objtype
540 58 6 if (defined $Tie::Persistent::PersistentData)
544 0 58 if defined $tied
547 0 58 if $dataref eq $datatype and $datatype ne $type and "$type$datatype" ne 'SCALARREF'
550 0 58 if ($tied) { }
556 0 0 if $tiedtype ne $datatype
558 0 0 if $tiedref ne $dataref
561 0 0 if ($tiedtype eq 'HASH') { }
0 0 elsif ($tiedtype eq 'ARRAY') { }
0 0 elsif ($tiedtype eq 'SCALAR' or $tiedtype eq 'REF') { }
572 0 58 if $dataref ne $type and "$type$dataref" ne 'SCALARREF'
576 14 44 if ($type eq 'HASH') { }
4 40 elsif ($type eq 'ARRAY') { }
40 0 elsif ($type eq 'SCALAR' or $type eq 'REF') { }
601 44 24 unless $mode =~ /[aw+]/
608 8 16 if ($type eq 'HASH') { }
2 14 elsif ($type eq 'ARRAY') { }
14 0 elsif ($type eq 'SCALAR') { }
618 12 12 if ($Tie::Persistent::Readable or not $Has_Storable) { }
620 0 12 unless open DB, ">$tmpfile"
624 0 12 if ($tied) { }
634 0 12 if ($tied) { }
644 18 6 if (-f $file)
646 0 18 if ($mode =~ /[a+]/) { }
653 18 0 if (defined $backup)
654 0 18 unless rename $file, $backup
660 0 24 unless rename $tmpfile, $file
669 4 0 if @_ > 1
681 0 0 unless $dir
683 0 0 unless opendir DIR, $dir
694 0 0 if (/\A$re\Z/)
695 0 0 if $nr < $1
709 2 34 if $_[0][4]
714 0 0 if $_[0][4]
715 0 0 if $_[0][4]
727 0 54 if $_[0][4]
729 0 2 if $_[0][4]
734 0 0 if $_[0][4]
741 0 0 if $$this[4]
747 0 0 if $_[0][4]
754 0 0 if $$this[4]
761 0 0 @_ ? :
762 0 0 if $off < 0
763 0 0 @_ ? :
764 0 0 if (defined wantarray) { }
766 0 0 if $$this[4]
770 0 0 if $$this[4]
782 0 28 if $_[0][4]