Branch Coverage

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


line true false branch
46 103 5 if (ref $cmd eq 'ARRAY') { }
0 5 elsif (defined $exe) { }
48 0 103 defined $exe ? :
49 2 101 unless defined $exe
55 7 99 if (defined $options->{'cwd'})
57 2 5 unless -d $options->{'cwd'}
62 9 95 if exists $options->{'stdin'}
64 14 90 if exists $options->{'stdout'}
66 9 95 if exists $options->{'stderr'}
70 104 0 if (defined $FD_CLOEXEC)
72 0 104 unless pipe $pipe_r, $pipe_w
79 0 0 unless pipe $pipe_r, $pipe_w
84 87 17 if ($pid = fork) { }
17 0 elsif (defined $pid) { }
0 0 elsif ($! == 11) { }
88 87 0 if (defined $pipe_r)
97 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)