Branch Coverage

blib/lib/File/RandomAccess.pm
Criterion Covered Total %
branch 49 120 40.8


line true false branch
65 1020 731 if (ref $filePt eq 'SCALAR') { }
87 515 216 unless $isRandom
109 730 28 unless ($self->{'TESTED'})
111 730 0 if (seek $fp, 1, 1 and seek $fp, -1, 1) { }
117 730 28 $self->{'TESTED'} == 1 ? :
128 3791 5587 if ($self->{'TESTED'} < 0) { }
147 420 8216 unless defined $whence
149 1380 7256 if ($self->{'TESTED'} < 0) { }
151 1052 328 if ($whence == 0) { }
233 95 elsif ($whence == 1) { }
0 95 elsif ($self->{'NoBuffer'} and $self->{'FILE_PT'}) { }
161 1367 0 if ($newPos >= 0 and !$self->{'NoBuffer'} || $newPos >= $self->{'POS'})
186 0 28925 if ($len & 4160749568)
187 0 0 if $len < 0
192 0 0 if $num < $maxLen
195 0 0 if $len <= 0
196 0 0 $len < $maxLen ? :
199 0 0 unless $n
202 0 0 if $n < $l
207 9187 19738 if ($self->{'TESTED'} < 0) { }
209 0 9187 if $self->{'NoBuffer'}
214 0 603 if ($num > 0 and $self->{'FILE_PT'})
218 0 0 if ($num) { }
0 0 elsif (not defined $num) { }
227 8584 603 if ($len <= $num) { }
489 114 elsif ($num <= 0) { }
240 7398 12340 unless defined $_[0]
242 0 19738 unless (defined $rtnVal)
247 0 28436 if ($self->{'DEBUG'})
249 0 0 unless ($self->{'DEBUG'}{$pos} and $self->{'DEBUG'}{$pos} > $rtnVal)
266 123 6718 if ($self->{'TESTED'} < 0) { }
268 0 123 if $self->{'NoBuffer'}
270 0 123 if ($fp) { }
274 0 0 unless ($num)
275 0 0 unless defined $num
284 0 0 if ($pos >= 0)
290 0 0 unless ($num)
291 0 0 unless defined $num
300 18 105 if ($pos < 0) { }
302 0 18 if $self->{'POS'} > $pos
313 6696 22 if (defined $_[0]) { }
319 0 6841 if ($self->{'DEBUG'})
321 0 0 unless ($self->{'DEBUG'}{$pos} and $self->{'DEBUG'}{$pos} > $rtnVal)
339 0 0 unless ($num)
340 0 0 unless defined $num
356 0 0 unless $self->{'FILE_PT'}
357 0 0 if $self->{'POS'} < 0
358 0 0 if ($self->{'POS'} > $CHUNK_SIZE)
360 0 0 if ($purge >= $self->{'LEN'}) { }
0 0 elsif ($purge > 0) { }
367 0 0 unless (defined $self->{'LEN'})
371 0 0 if $self->{'LEN'} < $SKIP_SIZE
389 741 55 if $self->{'FILE_PT'}
399 0 516 if ($self->{'DEBUG'})
401 0 0 if ($self->Seek(0, 2)) { }
409 0 0 if (defined $last and $last < $pos)
416 0 0 if ($buff =~ /[^\0]/)
423 0 0 unless defined $last and $last > $cur
426 0 0 if $bad
434 514 2 if ($self->{'FILE_PT'})