Branch Coverage

blib/lib/IO/Slice.pm
Criterion Covered Total %
branch 39 58 67.2


line true false branch
19 15 0 if @_
37 9 6 ref $_[0] ? :
43 2 27 unless defined $args{$mandatory}
52 2 11 if ($args{'fh'}) { }
56 1 10 unless exists $args{'filename'}
58 0 10 unless CORE::open my $fh, '<:raw', $args{'filename'}
91 150 4 if $self->read($buf, 1)
112 171 2 if (@_)
115 0 171 unless $newpos =~ /\A\d+\z/msx
117 0 171 if $newpos > $$self{'length'}
127 0 3 unless defined $whence
128 3 0 if ($whence == 0) { }
0 0 elsif ($whence == 1) { }
0 0 elsif ($whence == 2) { }
151 0 7 unless defined(my $nread = $self->read($buf, $count))
158 1 7 if $$self{'position'} >= $$self{'length'}
160 1 6 unless defined $IO::Slice::INPUT_RECORD_SEPARATOR
164 4 2 unless (length $IO::Slice::INPUT_RECORD_SEPARATOR)
167 0 4 if $idx < 0
179 0 2 if $idx < 0
192 0 6 unless ($chunk)
196 0 6 defined $buffer ? :
197 6 0 if (my($nreturn, $ndelete) = &$condition($buffer))
208 0 1 unless wantarray
217 1 3 if wantarray
229 4 159 if $position >= $data_length
232 0 159 unless CORE::seek $fh, $$self{'offset'} + $position, 0
236 3 156 if $length > $available
238 0 159 unless defined(my $nread = CORE::read($fh, $$bufref, $length, @_))