Branch Coverage

blib/lib/Paranoid/IO/FileMultiplexer/Block/StreamHeader.pm
Criterion Covered Total %
branch 25 50 50.0


line true false branch
91 207 0 if (defined $sname and length $sname and length $sname <= 20) { }
97 207 0 if (defined $self)
203 89 0 if (pflock($file, 1))
204 67 22 if ($self->bread(\$raw, 0, 40) == 40) { }
213 0 67 unless ($type eq "PIOFMSTRM")
219 0 67 unless ($sname eq $self->{'streamName'})
226 0 67 unless (defined $eos)
233 67 0 if ($rv) { }
265 566 0 if (defined $eos) { }
267 566 0 if ($self->bwrite($raw, 31) == 8)
293 2959 0 if ($self->bread(\$raw, 31, 8) == 8)
295 65 2894 if defined $rv and $rv == 0
316 2959 0 if $self->{'eos'} == $self->readEOS
339 0 0 if (pflock($file, 2))
345 0 0 unless $self->bwrite(pack("NN", $self->splitInt($rec)), $pos) == 8
349 0 0 unless $rv
355 0 0 unless $rv
380 67 0 if ($self->bread(\$raw, 40)) { }
391 67 45 unless defined $bn and $bn > $self->{'blockNum'}
394 0 45 unless (not defined $prev or $bn > $prev)
434 55 22 if (defined $bn and $bn > $self->{'blockNum'}) { }
437 0 55 if (scalar grep({$_ eq $bn;} @{$$self{"bats"};}))
443 0 55 if (scalar grep({$_ > $bn;} @{$$self{"bats"};}))
449 55 0 if ($rv)
454 0 55 unless $self->bwrite(pack("NN", $self->splitInt($bn)), 40 + 8 * $#{$$self{"bats"};}) == 8