Branch Coverage

File:Dpkg/IPC.pm
Coverage:75.0%

line%coveragebranch
15250TFunless $opts{'exec'}
156100TFif $opts{"to_$thing"}
157100TFif $opts{"error_to_$thing"}
158100TFif $opts{"from_$thing"}
16050TFif $to > 1
16250TFif $error_to > 1
16450TFif $from > 1
16850TFif (exists $opts{$param} and !ref($opts{$param}) || ref $opts{$param} ne 'SCALAR')
17550TFif (exists $opts{$param} and !ref($opts{$param}) || ref $opts{$param} ne 'SCALAR' && !$opts{$param}->isa('IO::Handle'))
18350TFif (exists $opts{'timeout'} and defined $opts{'timeout'} and not $opts{'timeout'} =~ /^\d+$/)
18850TFif (exists $opts{'env'} and ref $opts{'env'} ne "HASH")
19250TFif (exists $opts{'delete_env'} and ref $opts{'delete_env'} ne "ARRAY")
19650TFif (exists $opts{'sig'} and ref $opts{'sig'} ne "HASH")
20050TFif (exists $opts{'delete_sig'} and ref $opts{'delete_sig'} ne "ARRAY")
213100TFif (ref($opts{'exec'}) =~ /ARRAY/) { }
50TFelsif (not ref $opts{'exec'}) { }
221100TFif ($opts{'to_string'})
225100TFif ($opts{'error_to_string'})
229100TFif ($opts{'from_string'})
234100TFif ($opts{'from_pipe'})
23550TFunless pipe $opts{'from_handle'}, $input_pipe
240100TFif ($opts{'to_pipe'})
24250TFunless pipe $output_pipe, $opts{'to_handle'}
246100TFif ($opts{'error_to_pipe'})
24850TFunless pipe $error_pipe, $opts{'error_to_handle'}
25450TFunless defined $pid
255100TFunless ($pid)
257100TFif ($opts{'env'})
262100TFif ($opts{'delete_env'})
26650TFif ($opts{'sig'})
27150TFif ($opts{'delete_sig'})
275100TFif ($opts{'chdir'})
27650TFunless chdir $opts{'chdir'}
279100TFif ($opts{'from_file'}) { }
100TFelsif ($opts{'from_handle'}) { }
28150TFunless open STDIN, "<", $opts{'from_file'}
28450TFunless open STDIN, "<&", $opts{'from_handle'}
289100TFif ($opts{'to_file'}) { }
100TFelsif ($opts{'to_handle'}) { }
29150TFunless open STDOUT, ">", $opts{'to_file'}
29450TFunless open STDOUT, ">&", $opts{'to_handle'}
299100TFif ($opts{'error_to_file'}) { }
100TFelsif ($opts{'error_to_handle'}) { }
30150TFunless open STDERR, ">", $opts{'error_to_file'}
30450TFunless open STDERR, ">&", $opts{'error_to_handle'}
3110TFunless exec {$prog[0];} @prog
314100TFif exists $opts{'from_handle'}
315100TFif exists $opts{'to_handle'}
316100TFif exists $opts{'error_to_handle'}
318100TFif ($opts{'from_string'})
322100TFif ($opts{'to_string'})
326100TFif ($opts{'error_to_string'})
330100TFif ($opts{'wait_child'})
332100TFif ($opts{'env'})
38050TFunless $pid
383100TFif defined $opts{'timeout'}
38450TFunless $pid == waitpid($pid, 0)
385100TFif defined $opts{'timeout'}
387100TFif ($@)
38850TFunless $@ eq "alarm\n"
395100TFunless ($opts{'nocheck'})
39650TFif $?