Branch Coverage

blib/lib/Compress/BGZF/Reader.pm
Criterion Covered Total %
branch 64 94 68.0


line true false branch
40 0 3 unless defined $fn_in
41 0 3 unless tie *FH, $class, $fn_in
59 0 6 unless $self->{'fn_in'} = $fn_in
63 0 6 unless open my $fh, '<:raw', $fn_in
80 3 3 if (-e "$fn_in.gzi") { }
109 13 44 if defined $block_offset and $block_offset == $self->{'block_offset'}
112 25 19 unless (defined $block_offset)
119 0 44 if $self->{'block_offset'} > $self->{'file_size'}
120 11 33 if ($self->{'block_offset'} == $self->{'file_size'})
158 0 44 if $magic ne "\037\213\cH\cD"
167 44 0 if ($field_id eq 'BC')
168 0 44 if $field_len != 2
169 0 44 if defined $block_size
176 0 44 if $l != $len_extra
177 0 44 unless defined $block_size
182 33 11 if ($do_unpack) { }
187 0 33 if $status != Z_OK()
189 0 33 if $status != Z_STREAM_END()
193 0 33 if $crc_given != crc32($content)
200 0 44 if defined $content and $size_given != length $content
203 33 11 if defined $content
223 0 3 if $r < $bytes and $self->{'buffer_len'} > -1
225 0 3 if $r < 1
250 12 30 if (defined $offset and $offset != 0)
252 1 11 if $offset > length $$buf
265 19 38 if ($self->{'buffer_offset'} + $remaining <= $self->{'buffer_len'}) { }
269 0 19 if $self->{'buffer_offset'} == $self->{'buffer_len'}
272 23 15 if $self->{'buffer_len'} < 0
303 17 1009 if $self->{'buffer_len'} < 0
309 1005 4 if ($self->{'buffer'} =~ m[$/]g)
317 0 1005 if $pos == $self->{'buffer_len'}
331 1007 15 length $data > 0 ? :
351 0 3 unless defined $fn_out
354 0 3 unless defined $self->{'idx'}
381 0 3 unless defined $fn_in
385 0 3 unless open my $fh_in, '<:raw', $fn_in
386 0 3 unless read $fh_in, my $n_offsets, 8
391 0 8 unless read $fh_in, my $buff, 16
415 0 3 if $c_size != $self->{'file_size'}
496 6 48 if $whence == 1
497 18 36 if $whence == 2
499 7 47 if $pos < 0
500 15 32 if ($pos >= $self->{'u_file_size'})
516 3 32 if ($pos < $self->{'idx'}[$idx][1])
520 0 32 if ($idx + 1 < $s and $pos >= $self->{'idx'}[$idx + 1][1])
565 0 0 unless defined $self->{'ridx'}{$block_o}
587 0 242 if $r != $len