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)
82 18 126 unless defined $current_line
91 0 250 if $File::Process::EVAL_ERROR
93 2 248 unless defined $current_line
96 4 120 if ($args{'merge_lines'}) { }
104 0 18 if ($File::Process::EVAL_ERROR)
118 18 0 if (&openhandle($file)) { }
124 0 0 unless open $fh, "<", $file
134 1 17 $args->{'merge_lines'} ? :
146 52 0 if (&openhandle($fh))
147 44 8 unless (eof $fh)
148 0 44 unless defined($current_line = readline $fh)
161 126 0 if ($args->{'chomp'})
165 12 114 if ($args->{'trim'} and $args->{'trim'} =~ /(front|both)/msx)
169 12 114 if ($args->{'trim'} and $args->{'trim'} =~ /(both|back)/msx)
176 12 114 if ($args->{'skip_blank_lines'} or $args->{'skip_comments'})
178 1 11 if ($args->{'skip_blank_lines'} and "$current_line" eq $File::Process::EMPTY)
183 0 12 if (not $args->{'chomp'} and "$current_line" eq $File::Process::NL)
187 1 11 if ($args->{'skip_comments'} and $current_line =~ /^\#/msx)
192 9 117 $args->{'skipped'} + $skip ? :
194 2 124 $skip ? :
214 1 16 if ($args->{'merge_lines'}) { }
221 2 15 unless ($args->{'keep_open'})
223 0 2 unless close $fh
358 0 0 if ($args->{'has_headers'})