Branch Coverage

blib/lib/Tie/TwoLevelHash.pm
Criterion Covered Total %
branch 45 96 46.8


line true false branch
35 1 1 if ($path =~ /,/)
39 0 2 if (@_)
47 2 0 $mode eq 'rw' ? :
49 0 2 unless (-e $path)
50 0 0 if ($clobber) { }
52 0 0 unless (open FH, ">$path")
62 0 2 unless open $fh, $path
67 1 1 if ($oneHash ne '') { }
72 1 2 if ($key eq $oneHash)
89 1 1 if defined %unihash
90 1 1 if defined %unihash
91 0 2 if defined $comment
93 1 1 if ($oneHash ne '') { }
106 3 2 if ($$self{'SINGLEHASH'})
108 0 3 if ($key eq $uniname)
112 0 3 unless (exists $$self{'BIHASH'}{$uniname}{$key})
116 3 0 if (defined $$self{'BIHASH'}{$uniname}{$key}) { }
124 0 2 unless (exists $$self{'BIHASH'}{$key})
128 2 0 if (defined $$self{'BIHASH'}{$key}) { }
149 4 3 if ($single) { }
152 0 7 if (not $single and $value eq '')
153 0 0 unless ($self->EXISTS($key))
158 0 0 if (not $self->_deleteRecord($key)) { }
165 3 4 unless ($single)
169 0 7 unless ($$self{'CLOBBER'})
175 0 7 unless ($fh = 'FileHandle'->new(">$file"))
181 3 4 if (not $single) { }
184 0 4 if ($inKey eq '')
191 0 4 unless (defined $value)
203 0 7 if (defined $$self{'COMMENTS'})
210 3 4 if (not $single) { }
217 18 0 if defined $zog{$bar}
227 24 0 if defined $zog{$bar}
231 4 3 if defined %unihash
243 0 0 if ($$self{'SINGLEHASH'}) { }
258 0 0 if ($$self{'SINGLEHASH'})
271 0 0 unless ($$self{'SINGLEHASH'})
273 0 0 unless ($fh = 'FileHandle'->new(">$file"))
319 0 0 unless (defined $record)
326 0 0 unless ($fh = 'FileHandle'->new(">$file"))
331 0 0 if defined $$self{'COMMENTS'}
335 0 0 if ($foo eq $record)
344 0 0 if defined $zog{$bar}
364 0 2 unless (open $FH, "$slh")
374 0 2 if ($records[0] and $records[0] =~ /^#/)
389 0 2 unless (close $FH)
401 0 0 if $$self{'UNIHASHNAME'} ne ''
403 0 0 if (defined $name) { }