Branch Coverage

blib/lib/IPC/System/Options.pm
Criterion Covered Total %
branch 67 146 45.8


line true false branch
22 3 0 if ($_[$i] =~ /\A(system|readpipe|backtick|run|import)\z/) { }
0 0 elsif ($_[$i] =~ /\A-(.+)/) { }
26 0 0 unless $i < @_ - 1
37 0 1 if (@_ == 1)
41 0 1 if ($^O eq 'MSWin32') { }
44 0 0 ref $_ eq 'SCALAR' ? :
48 0 3 ref $_ eq 'SCALAR' ? :
55 12 2 ref $_[0] eq 'HASH' ? :
57 0 0 unless defined $opts->{$_}
63 1 15 unless /\A( capture_stdout|capture_stderr|capture_merged| tee_stdout|tee_stderr|tee_merged| chdir|dies?|dry_run|env|lang|log||max_log_output|shell| stdin # XXX: only for run() )\z/x
78 0 13 if ($opts->{'log'})
84 2 11 if ($opts->{'chdir'})
87 0 2 unless (defined $cwd)
88 0 0 if $log
94 1 1 unless (chdir $opts->{'chdir'})
95 0 1 if $log
106 0 12 if ($opts->{'lang'})
111 1 11 if ($opts->{'env'})
114 1 11 if (%set_env)
127 0 11 if ($opts->{'capture_stdout'} and $opts->{'capture_stderr'}) { }
1 10 elsif ($opts->{'capture_merged'}) { }
2 8 elsif ($opts->{'capture_stdout'}) { }
1 7 elsif ($opts->{'capture_stderr'}) { }
0 7 elsif ($opts->{'tee_stdout'} and $opts->{'tee_stderr'}) { }
1 6 elsif ($opts->{'tee_merged'}) { }
1 5 elsif ($opts->{'tee_stdout'}) { }
1 4 elsif ($opts->{'tee_stderr'}) { }
165 10 2 if ($which eq 'system') { }
1 1 elsif ($which eq 'readpipe') { }
167 0 10 if ($opts->{'log'} or $opts->{'dry_run'})
168 0 0 if ($opts->{'log'}) { }
172 0 0 if ($opts->{'dry_run'}) { }
182 0 0 if ($opts->{'dry_run'})
190 0 10 if ($opts->{'shell'}) { }
0 10 elsif (defined $opts->{'shell'}) { }
210 0 1 if ($opts->{'log'} or $opts->{'dry_run'})
211 0 0 if ($opts->{'log'}) { }
215 0 0 if ($opts->{'dry_run'}) { }
225 0 0 if ($opts->{'dry_run'})
233 0 1 if ($wa) { }
244 0 1 if ($opts->{'log'})
246 0 0 if (defined $opts->{'max_log_output'})
248 0 0 if ($wa) { }
250 0 0 if (length($res_show) + length($_) >= $opts->{'max_log_output'}) { }
260 0 0 if (length $res > $opts->{'max_log_output'})
268 0 0 defined $res_show ? :
0 0 defined $res_show ? :
0 0 unless $exit_code
274 0 1 if ($opts->{'log'} or $opts->{'dry_run'})
275 0 0 if ($opts->{'log'}) { }
279 0 0 if ($opts->{'dry_run'}) { }
290 0 0 if ($opts->{'dry_run'})
302 1 0 if ($opts->{'capture_stdout'}) { }
309 0 0 if ($opts->{'capture_stderr'}) { }
315 1 0 defined $opts->{'stdin'} ? :
322 1 11 if (%save_env)
324 0 1 if (defined $save_env{$_}) { }
333 1 11 if ($cwd)
334 0 1 unless (chdir $cwd)
335 0 0 if $log
344 3 10 if ($exit_code)
345 2 1 if ($opts->{'log'} or $opt_die)
360 1 1 defined $extra_error ? :
1 1 defined $extra_error ? :
0 0 defined ${$$opts{'capture_stdout'};} ? :
0 2 ref $opts->{'capture_stdout'} ? :
0 0 defined ${$$opts{'capture_stderr'};} ? :
0 2 ref $opts->{'capture_stderr'} ? :
0 0 defined ${$$opts{'capture_merged'};} ? :
0 2 ref $opts->{'capture_merged'} ? :
362 0 2 if $opts->{'log'}
363 2 0 if $opt_die
369 0 11 $wa && $which ne 'run' ? :