Branch Coverage

blib/lib/Compress/BGZF/Writer.pm
Criterion Covered Total %
branch 14 36 38.8


line true false branch
33 0 3 unless tie *$fh, $class, $fn_out
50 3 0 if (defined $fn_out) { }
51 0 3 unless open $self->{'fh'}, '>', $fn_out
84 0 0 unless $level =~ /^\d$/
130 4 1 if length $unwritten
153 0 8 unless rawdeflate(\$chunk, \my $payload, '-Level', $self->{'c_level'})
164 0 4 unless rawdeflate(\$chunk, \$payload, '-Level', $self->{'c_level'})
170 0 8 if $block_size > 65536
173 0 8 unless print {$self->{'fh'};} pack('a*va*VV', "\037\213\cH\cD\000\000\000\000\000\377\cF\000BC\cB\000", $block_size - 1, $payload, crc32($chunk), $chunk_len)
204 0 3 unless defined fileno $self->{'fh'}
209 0 3 if length $unwritten
212 3 3 if (defined fileno $self->{'fh'})
214 0 3 unless close $self->{'fh'}
232 0 0 unless defined $fn_out
233 0 0 unless open my $fh_out, '>:raw', $fn_out
238 0 0 unless print {$fh_out;} pack('Q<', scalar @offsets)
241 0 0 unless print {$fh_out;} pack('Q
245 0 0 unless close $fh_out