Branch Coverage

blib/lib/IO/CaptureOutput.pm
Criterion Covered Total %
branch 50 58 86.2


line true false branch
23 2 58 if $error
28 48 10 if (defined $output or defined $error)
30 10 86 unless ref $_
31 17 79 if $_ != \(undef) and not defined $$_
48 56 2 if (not defined $output or $output != \(undef))
53 56 2 if (not defined $error or $error != \(undef))
54 20 36 $should_merge ? :
74 4 1 $exit == 0 ? :
76 4 1 wantarray ? :
85 4 1 $exit == 0 ? :
87 4 1 wantarray ? :
97 0 0 if (/[ \"]/)
115 1 59 if (defined $output and defined $error and defined $output_file and defined $error_file and $output == $error and $output != \(undef) and $output_file ne $error_file) { }
1 59 elsif (not defined $output || defined $error and defined $output_file and defined $error_file and $output_file ne $error_file) { }
142 0 110 if $^O eq 'MSWin32'
154 110 2 if (defined fileno $orig_fh and not _is_wperl())
156 0 110 unless open $saved_fh, ">&$orig_fh"
162 92 20 if (not $merge_fh) { }
164 19 73 if ($capture_file) { }
169 0 92 unless open $newio_fh, "+>$newio_file"
178 0 112 unless open $fhref, '>&' . fileno($newio_fh)
189 2 110 unless $pid eq $$
194 108 2 if (defined $saved_fh) { }
195 0 108 unless open $fh_ref, '>&' . fileno($saved_fh)
203 80 30 if (ref $capture_var and $newio_file)
211 90 20 if $newio_file
214 20 90 unless defined $newio_file and -e $newio_file
215 19 71 if $capture_file
216 0 71 unless unlink $newio_file