Branch Coverage

blib/lib/WARC/Record/Logical/Block.pm
Criterion Covered Total %
branch 66 68 97.0


line true false branch
30 14 48 if $self->[1] > $#{$$self[0]{'segments'};}
33 0 62 if $self->[2] and UNIVERSAL::can(tied *{$self->[2];}, '_dbg_dump')
53 16 63 unless ($self->[0]{'segments'}[1 + $self->[1]])
65 1 62 if (wantarray)
71 5 57 if $self->[1] > $#{$$self[0]{'segments'};}
73 4 53 if (not defined $/) { }
10 43 elsif (ref $/) { }
11 32 elsif ($/ eq '') { }
75 2 2 unless defined $data
77 3 1 length $data ? :
82 3 7 unless defined $rec
85 1 8 unless $self->_next_segment
88 9 1 length $rec ? :
98 6 5 if (eof $self->[2])
104 3 3 defined $ch ? :
106 10 1 length $para ? :
115 22 29 if (length $/ > 1)
122 1 38 unless $count
124 4 34 if $/ eq substr($line, -length($/))
132 2 25 unless length $line
144 2 68 if $self->[1] > $#{$$self[0]{'segments'};}
149 0 99 unless defined $count
153 21 47 unless defined $_[0]
154 1 67 if $offset > length $_[0]
163 4 18 unless $self->READ($ch, 1)
170 14 2 if $self->[1] > $#{$$self[0]{'segments'};}
171 1 1 if $self->[1] < $#{$$self[0]{'segments'};}
184 8 4 if ($whence == 0) { }
1 3 elsif ($whence == 1) { }
2 1 elsif ($whence == 2) { }
197 4 7 if ($npos >= $segments->[-1][2] + $segments->[-1][1])
205 6 17 if $npos >= $segments->[$i][2] and $npos < $segments->[$i][2] + $segments->[$i][1]
211 1 6 unless $new_segment
225 12 3 if $self->[1] <= $#{$segments;}