Branch Coverage

blib/lib/File/RoundRobin.pm
Criterion Covered Total %
branch 48 96 50.0


line true false branch
208 0 18 if ($params{'mode'} eq "new" and not defined $params{'size'})
215 0 18 unless $fh
262 13 560 if ($self->{'_write_start_point_'} == $self->{'_read_start_point_'})
263 5 8 if ($self->{'_read_started_'}) { }
273 483 85 $self->{'_write_start_point_'} > $self->{'_read_start_point_'} ? :
275 559 9 $to_eof > $length ? :
277 0 568 unless $length
279 0 568 if $offset
287 8 560 if ($bytes < $length)
289 0 8 if ($self->{'_write_start_point_'} - $self->{'_headers_size_'} < $length)
298 8 560 $buffer2 ? :
328 0 11 if ($self->{'_read_only_'})
333 0 11 if $offset
353 11 0 unless $self->{'_autoflush_'} == 0
355 11 0 $self->{'_write_start_point_'} == CORE::tell $fh ? :
393 10 18 if $self->{'_closed_'}
395 10 8 unless ($self->{'_read_only_'})
417 0 0 if $self->{'_write_start_point_'} == $self->{'_read_start_point_'} and defined $self->{'_read_started_'}
439 0 0 if (scalar @_)
468 0 19 unless (defined $params{'path'})
471 0 19 if (-d $params{'path'})
476 10 9 if ($params{'mode'} eq 'new' or $params{'mode'} eq 'append' and not -f $params{'path'}) { }
477 0 10 unless (defined $params{'size'})
482 0 10 unless (open $fh, "+>", $params{'path'})
498 1 8 if ($params{'mode'} eq 'append') { }
8 0 elsif ($params{'mode'} eq 'read') { }
499 0 1 unless (open $fh, "+<", $params{'path'})
508 0 8 unless (open $fh, "<", $params{'path'})
528 0 9 if (not $version or $version ne 1 or int($size || '') == 0 or int($start_point || '') == 0)
627 0 0 if ($offset)
628 0 0 if ($offset + $self->{'_read_start_point_'} > $self->{'_file_length_'}) { }
674 3 0 if ($whence == 0) { }
0 0 elsif ($whence == 1) { }
0 0 elsif ($whence == 2) { }
676 0 3 if ($self->{'_write_start_point_'} + $position > $self->{'_file_length_'})
680 3 0 if (sysseek $self->{'_fh_'}, $start_pos + $position, 0)
687 0 0 if ($self->{'_read_start_point_'} + $position > $self->{'_file_length_'})
691 0 0 if (sysseek $self->{'_fh_'}, $start_pos + $position, 1)
697 0 0 if ($position > 0)
704 0 0 if ($self->{'_write_start_point_'} + $position < $self->{'_headers_size_'})
711 0 0 if ($self->{'_read_start_point_'} < $self->{'_write_start_point_'} and $self->{'_read_start_point_'} + $position >= $self->{'_write_start_point_'})
716 0 0 if (sysseek $self->{'_fh_'}, $start_pos, 0)
717 0 0 if (sysseek $self->{'_fh_'}, $position, 1)
745 0 0 if ($self->{'_read_start_point_'} >= $self->{'_write_start_point_'}) { }
777 9 15 unless defined $size
779 5 10 if $size =~ /^\d+$/
787 9 1 if ($size =~ /^(\d+(?:\.\d+)?)(K|M|G)b?$/i) { }
826 5 553 if $char =~ /[\n\r]/