Branch Coverage

blib/lib/Proc/Background/Unix.pm
Criterion Covered Total %
branch 52 76 68.4


line true false branch
45 103 5 if (ref $cmd eq 'ARRAY') { }
0 5 elsif (defined $exe) { }
47 0 103 defined $exe ? :
48 2 101 unless defined $exe
54 7 99 if (defined $options->{'cwd'})
56 2 5 unless -d $options->{'cwd'}
61 9 95 if exists $options->{'stdin'}
63 14 90 if exists $options->{'stdout'}
65 9 95 if exists $options->{'stderr'}
69 104 0 if (defined $FD_CLOEXEC)
71 0 104 unless pipe $pipe_r, $pipe_w
78 0 0 unless pipe $pipe_r, $pipe_w
83 87 17 if ($pid = fork) { }
17 0 elsif (defined $pid) { }
0 0 elsif ($! == 11) { }
87 87 0 if (defined $pipe_r)
96 0 87 if (length $msg)
111 2 15 if defined $options->{'cwd'}
113 3 14 if defined $new_stdin
115 4 13 if defined $new_stdout
117 3 14 if defined $new_stderr
120 16 1 if (defined $exe) { }
121 0 0 unless exec {$exe;} @argv
123 0 0 unless exec $cmd
126 0 0 if (defined $pipe_w) { }
147 11 21 if (not defined $thing) { }
19 2 elsif (ref $thing) { }
148 0 11 unless open my $fh, $mode, "/dev/null"
152 2 17 fileno $thing == fileno $default ? :
154 0 2 unless open my $fh, $mode, $thing
170 57 147 if ($blocking and $wait_seconds) { }
177 23 124 $blocking ? :
181 87 117 if ($result == $self->{'_os_obj'}) { }
0 117 elsif ($result == -1 and $! == 10) { }
117 0 elsif ($result == 0) { }
209 0 26 @_ && ref $_[0] eq 'ARRAY' ? :
216 0 26 unless defined $delay
217 26 0 if $self->_reap(1, $delay)