Branch Coverage

blib/lib/File/Process.pm
Criterion Covered Total %
branch 40 52 76.9


line true false branch
59 10 0 if (&openhandle($file)) { }
65 0 0 unless open $fh, "<", $file
75 1 9 $args->{'merge_lines'} ? :
87 52 0 if (&openhandle($fh))
88 44 8 unless (eof $fh)
89 0 44 unless defined($current_line = readline $fh)
102 45 9 if ($args->{'chomp'})
106 12 42 if ($args->{'trim'} and $args->{'trim'} =~ /(front|both)/msx)
110 12 42 if ($args->{'trim'} and $args->{'trim'} =~ /(both|back)/msx)
117 12 42 if ($args->{'skip_blank_lines'} or $args->{'skip_comments'})
119 1 11 if ($args->{'skip_blank_lines'} and "$current_line" eq $EMPTY)
124 0 12 if (not $args->{'chomp'} and "$current_line" eq $NL)
128 1 11 if ($args->{'skip_comments'} and $current_line =~ /^\#/msx)
133 9 45 $args->{'skipped'} + $skip ? :
135 2 52 $skip ? :
155 1 8 if ($args->{'merge_lines'}) { }
162 3 6 unless ($args->{'keep_open'})
164 0 3 unless close $fh
181 45 5 unless ($processors{$_})
190 0 10 if (not $fh && ref $all_lines or !&reftype($all_lines) eq "ARRAY")
196 10 54 unless defined $current_line
203 0 106 if $File::Process::EVAL_ERROR
204 2 104 unless defined $current_line
207 4 48 if ($args{'merge_lines'}) { }
215 0 10 if ($File::Process::EVAL_ERROR)
351 0 0 if ($args->{'has_headers'})