Branch Coverage

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


line true false branch
41 0 3 unless defined $fn_in
43 0 3 unless tie *$fh, $class, $fn_in
63 0 6 unless $self->{'fn_in'} = $fn_in
67 0 6 unless open my $fh, '<:raw', $fn_in
84 3 3 if (-e "$fn_in.gzi") { }
113 13 44 if defined $block_offset and $block_offset == $self->{'block_offset'}
116 25 19 unless (defined $block_offset)
123 0 44 if $self->{'block_offset'} > $self->{'file_size'}
124 11 33 if ($self->{'block_offset'} == $self->{'file_size'})
162 0 44 if $magic ne "\037\213\cH\cD"
171 44 0 if ($field_id eq 'BC')
172 0 44 if $field_len != 2
173 0 44 if defined $block_size
180 0 44 if $l != $len_extra
181 0 44 unless defined $block_size
186 33 11 if ($do_unpack) { }
191 0 33 if $status != Z_OK()
193 0 33 if $status != Z_STREAM_END()
197 0 33 if $crc_given != crc32($content)
204 0 44 if defined $content and $size_given != length $content
207 33 11 if defined $content
227 0 3 if $r < $bytes and $self->{'buffer_len'} > -1
229 0 3 if $r < 1
254 12 30 if (defined $offset and $offset != 0)
256 1 11 if $offset > length $$buf
269 19 38 if ($self->{'buffer_offset'} + $remaining <= $self->{'buffer_len'}) { }
273 0 19 if $self->{'buffer_offset'} == $self->{'buffer_len'}
276 23 15 if $self->{'buffer_len'} < 0
307 17 1009 if $self->{'buffer_len'} < 0
313 1005 4 if ($self->{'buffer'} =~ m[$/]g)
321 0 1005 if $pos == $self->{'buffer_len'}
335 1007 15 length $data > 0 ? :
355 0 3 unless defined $fn_out
358 0 3 unless defined $self->{'idx'}
385 0 3 unless defined $fn_in
389 0 3 unless open my $fh_in, '<:raw', $fn_in
390 0 3 unless read $fh_in, my $n_offsets, 8
395 0 8 unless read $fh_in, my $buff, 16
419 0 3 if $c_size != $self->{'file_size'}
500 6 48 if $whence == 1
501 18 36 if $whence == 2
503 7 47 if $pos < 0
504 15 32 if ($pos >= $self->{'u_file_size'})
520 3 32 if ($pos < $self->{'idx'}[$idx][1])
524 0 32 if ($idx + 1 < $s and $pos >= $self->{'idx'}[$idx + 1][1])
569 0 0 unless defined $self->{'ridx'}{$block_o}
591 0 242 if $r != $len