Branch Coverage

File:Dpkg/IPC.pm
Coverage:75.0%

line%coveragebranch
15350TFunless $opts{'exec'}
157100TFif $opts{"to_$thing"}
158100TFif $opts{"error_to_$thing"}
159100TFif $opts{"from_$thing"}
16150TFif $to > 1
16350TFif $error_to > 1
16550TFif $from > 1
16950TFif (exists $opts{$param} and !ref($opts{$param}) || ref $opts{$param} ne 'SCALAR')
17650TFif (exists $opts{$param} and !ref($opts{$param}) || ref $opts{$param} ne 'SCALAR' && !$opts{$param}->isa('IO::Handle'))
18450TFif (exists $opts{'timeout'} and defined $opts{'timeout'} and not $opts{'timeout'} =~ /^\d+$/)
18950TFif (exists $opts{'env'} and ref $opts{'env'} ne "HASH")
19350TFif (exists $opts{'delete_env'} and ref $opts{'delete_env'} ne "ARRAY")
19750TFif (exists $opts{'sig'} and ref $opts{'sig'} ne "HASH")
20150TFif (exists $opts{'delete_sig'} and ref $opts{'delete_sig'} ne "ARRAY")
214100TFif (ref($opts{'exec'}) =~ /ARRAY/) { }
50TFelsif (not ref $opts{'exec'}) { }
222100TFif ($opts{'to_string'})
226100TFif ($opts{'error_to_string'})
230100TFif ($opts{'from_string'})
235100TFif ($opts{'from_pipe'})
23650TFunless pipe $opts{'from_handle'}, $input_pipe
241100TFif ($opts{'to_pipe'})
24350TFunless pipe $output_pipe, $opts{'to_handle'}
247100TFif ($opts{'error_to_pipe'})
24950TFunless pipe $error_pipe, $opts{'error_to_handle'}
25550TFunless defined $pid
256100TFunless ($pid)
258100TFif ($opts{'env'})
263100TFif ($opts{'delete_env'})
26750TFif ($opts{'sig'})
27250TFif ($opts{'delete_sig'})
276100TFif ($opts{'chdir'})
27750TFunless chdir $opts{'chdir'}
280100TFif ($opts{'from_file'}) { }
100TFelsif ($opts{'from_handle'}) { }
28250TFunless open STDIN, "<", $opts{'from_file'}
28550TFunless open STDIN, "<&", $opts{'from_handle'}
290100TFif ($opts{'to_file'}) { }
100TFelsif ($opts{'to_handle'}) { }
29250TFunless open STDOUT, ">", $opts{'to_file'}
29550TFunless open STDOUT, ">&", $opts{'to_handle'}
300100TFif ($opts{'error_to_file'}) { }
100TFelsif ($opts{'error_to_handle'}) { }
30250TFunless open STDERR, ">", $opts{'error_to_file'}
30550TFunless open STDERR, ">&", $opts{'error_to_handle'}
3120TFunless exec {$prog[0];} @prog
315100TFif exists $opts{'from_handle'}
316100TFif exists $opts{'to_handle'}
317100TFif exists $opts{'error_to_handle'}
319100TFif ($opts{'from_string'})
323100TFif ($opts{'to_string'})
327100TFif ($opts{'error_to_string'})
331100TFif ($opts{'wait_child'})
333100TFif ($opts{'env'})
38150TFunless $pid
384100TFif defined $opts{'timeout'}
38550TFunless $pid == waitpid($pid, 0)
386100TFif defined $opts{'timeout'}
388100TFif ($@)
38950TFunless $@ eq "alarm\n"
396100TFunless ($opts{'nocheck'})
39750TFif $?