Branch Coverage

blib/lib/Storable.pm
Criterion Covered Total %
branch 66 102 64.7


line true false branch
34 0 30 if (eval { do { local $SIG{'__DIE__'}; local(@INC) = @INC; pop @INC if $INC[-1] eq '.'; require Log::Agent; 1 } })
37 30 0 if $INC[-1] eq '.'
47 30 0 unless ($main::Storable::{'logcroak'} and *{$main::Storable::{'logcroak'};}{'CODE'})
53 30 0 unless ($main::Storable::{'logcarp'} and *{$main::Storable::{'logcarp'};}{'CODE'})
66 30 0 if (eval { do { require Fcntl; 1 } } and exists $Fcntl::EXPORT_TAGS{'flock'}) { }
134 1 27 unless open $fh, '<', $file
136 0 27 unless defined sysread($fh, my $buf, 32)
139 0 27 unless $file
150 52 3 if ($buf =~ s/^(pst0|perl-store)//) { }
155 1 2 if $file
159 0 54 unless length $buf
162 2 52 if ($magic eq 'perl-store' and ord substr($buf, 0, 1) > 1) { }
169 0 52 if $major > 4
172 44 8 if ($major > 1) { }
173 0 44 unless $buf =~ s/(.)//s
186 33 21 unless ($net_order)
187 0 33 unless $buf =~ s/(.)//s
189 0 33 unless length $buf >= $len
190 0 33 unless $len == 4 or $len == 8
194 25 8 if ($info{'version_nv'} >= 2.002)
195 0 25 unless $buf =~ s/(.)//s
256 0 96 unless ref $self
257 0 96 unless @_ == 2
259 1 95 if ($use_locking) { }
260 0 1 unless open FILE, '>>', $file
261 0 1 unless (&CAN_FLOCK)
266 0 1 unless flock FILE, 2
271 0 95 unless open FILE, '>', $file
284 1 95 if (not close FILE || undef $ret or $@)
285 0 1 unless unlink $file
287 1 95 if $@ =~ s/\.?\n$/,/
317 0 3 unless ref $self
318 0 3 unless @_ == 1
320 0 3 unless defined $fd
325 0 3 if $@ =~ s/\.?\n$/,/
354 0 212 unless ref $self
355 0 212 unless @_ == 0
360 4 208 if $@ =~ s/\.?\n$/,/
362 208 0 $ret ? :
392 187 0 unless defined $flags
394 0 187 unless open $FILE, '<', $file
398 1 186 if ($use_locking)
399 0 1 unless (&CAN_FLOCK)
404 0 1 unless flock $FILE, 1
409 46 141 if $@ =~ s/\.?\n$/,/
421 8 0 unless defined $flags
423 0 8 unless defined $fd
427 4 4 if $@ =~ s/\.?\n$/,/
447 309 0 unless defined $flags
448 0 309 unless defined $frozen
452 51 258 if $@ =~ s/\.?\n$/,/