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)
112 2 15 if defined $options->{'cwd'}
114 3 14 if defined $new_stdin
116 4 13 if defined $new_stdout
118 3 14 if defined $new_stderr
121 16 1 if (defined $exe) { }
122 0 0 unless exec {$exe;} @argv
124 0 0 unless exec $cmd
127 0 0 if (defined $pipe_w) { }
148 11 21 if (not defined $thing) { }
19 2 elsif (ref $thing) { }
149 0 11 unless open my $fh, $mode, "/dev/null"
153 2 17 fileno $thing == fileno $default ? :
155 0 2 unless open my $fh, $mode, $thing
171 57 147 if ($blocking and $wait_seconds) { }
178 23 124 $blocking ? :
182 87 117 if ($result == $self->{'_os_obj'}) { }
0 117 elsif ($result == -1 and $! == 10) { }
117 0 elsif ($result == 0) { }
210 0 26 @_ && ref $_[0] eq 'ARRAY' ? :
217 0 26 unless defined $delay
218 26 0 if $self->_reap(1, $delay)