Branch Coverage

blib/lib/Text/Parts.pm
Criterion Covered Total %
branch 67 96 69.7


line true false branch
11 51 1 if $args{'file'}
18 1 0 if @_
24 0 81 if @_
30 0 0 if @_
36 0 0 if @_
47 0 4 unless $opt{'num'} or $opt{'size'}
49 57 4 $opt{'num'} ? :
50 9 52 $opt{'max_num'} ? :
52 0 61 if $num <= 1
58 0 61 unless open my $fh, '<', $file
59 0 61 if $^O =~ /MSWin/
64 0 61 $$self{'parser'} ? :
65 16 45 if $$self{'check_line_start'}
68 9 10293 if $cnt++ > $max_num
69 5 10288 if $start + $chunk_size > $file_size
70 13 10280 unless $chunk_size
75 6107 4173 exists $opt{'no_open'} ? :
78 9974 306 if ($num > 1 and $chunk_size > $eol_len + 1)
80 0 9974 if $chunk_size < $eol_len + 1
91 0 20 unless $filename
92 11 9 ref $opt{'code'} eq 'CODE' ? :
94 9 11 defined $opt{'start_number'} ? :
96 3 17 $opt{'last_number'} ? :
98 0 20 unless open my $fh, '<', $self->file
99 0 20 if $^O =~ /MSWin/
107 0 6107 unless open my $fh_w, '>', $filename[-1]
108 0 6107 if $^O =~ /MSWin/
112 4044 2063 if $code
145 34 0 $current - 1024 < 0 ? :
153 30 10 if (@buffer > 1) { }
161 30 4 $check ? :
185 127 10153 unless ($args{'no_open'})
198 0 6171 unless open my $fh, '<', $$self{'file'}
205 4046 6044 $$self{'fh'} ? :
219 1998 4106 if ($$self{'no_open'} and not $self->is_opened) { }
221 0 1998 if $self->eof
225 15 4091 if $self->eof
228 15 6089 $buf ? :
233 0 4061 unless $name
234 4046 15 if ($$self{'no_open'} and not $self->is_opened) { }
236 0 4046 unless open my $fh, '>', $name
237 0 4046 if $^O =~ /MSWin/
241 0 15 unless open my $fh, '>', $name
242 0 15 if $^O =~ /MSWin/
249 82 132 if $self->eof
257 0 0 if $self->eof
259 0 0 if ($$self{'parser'}) { }
271 209 6333 $$self{'end'} <= tell $$self{'fh'} ? :