Branch Coverage

blib/lib/File/Process.pm
Criterion Covered Total %
branch 39 52 75.0


line true false branch
66 68 22 unless ($processors{$_})
75 0 18 unless ($fh and ref $all_lines)
81 18 126 unless defined $current_line
89 0 250 if $File::Process::EVAL_ERROR
91 2 248 unless defined $current_line
94 4 120 if ($args{'merge_lines'}) { }
102 0 18 if ($File::Process::EVAL_ERROR)
116 18 0 if (&openhandle($file)) { }
122 0 0 unless open $fh, "<", $file
132 1 17 $args->{'merge_lines'} ? :
144 52 0 if (&openhandle($fh))
145 44 8 unless (eof $fh)
146 0 44 unless defined($current_line = readline $fh)
159 126 0 if ($args->{'chomp'})
163 12 114 if ($args->{'trim'} and $args->{'trim'} =~ /(front|both)/msx)
167 12 114 if ($args->{'trim'} and $args->{'trim'} =~ /(both|back)/msx)
174 12 114 if ($args->{'skip_blank_lines'} or $args->{'skip_comments'})
176 1 11 if ($args->{'skip_blank_lines'} and "$current_line" eq $File::Process::EMPTY)
181 0 12 if (not $args->{'chomp'} and "$current_line" eq $File::Process::NL)
185 1 11 if ($args->{'skip_comments'} and $current_line =~ /^\#/msx)
190 9 117 $args->{'skipped'} + $skip ? :
192 2 124 $skip ? :
212 1 16 if ($args->{'merge_lines'}) { }
219 2 15 unless ($args->{'keep_open'})
221 0 2 unless close $fh
355 0 0 if ($args->{'has_headers'})