Branch Coverage

blib/lib/Proc/Background.pm
Criterion Covered Total %
branch 67 114 58.7


line true false branch
52 0 103 unless length $command
61 101 2 if ($command =~ /$is_absolute_re/o) { }
64 101 0 if (-f $p and -x _)
69 101 0 defined $path ? :
72 0 2 if ($command =~ /$has_dir_element_re/o) { }
76 0 0 if (-f $p2 and -x _)
82 0 2 $is_windows ? :
83 0 18 unless length $dir
84 2 16 unless $dir =~ /$is_absolute_re/o
88 0 18 if (-f $p2 and -x _)
93 0 18 if defined $path
96 0 2 defined $path ? :
121 24 84 if (@_ and ref $_[0] eq 'HASH') { }
125 0 24 if @unknown
133 2 106 if $options->{'autodie'}
139 14 94 if (defined $cmd) { }
140 0 14 if @_
143 0 0 unless ref $cmd eq "ARRAY" and defined $cmd->[0] and length $cmd->[0] or not ref $cmd and defined $cmd and length $cmd
149 0 94 unless @_
151 0 94 unless defined $_[0]
155 89 5 @_ > 1 || defined $options->{'exe'} ? :
159 0 108 if defined $options->{'exe'}
162 2 87 unless $self->_start($options)
167 2 85 if ($options->{'autoterminate'} or $options->{'die_upon_destroy'})
178 2 2 if $self->{'_autodie'}
185 2 0 if (@_ > 1 and ($newval xor $self->{'_die_upon_destroy'}))
186 2 0 if ($newval) { }
191 2 0 if $weaken_subref
199 2 0 $newval ? :
201 0 2 unless $self->{'_die_upon_destroy'}
206 2 47 if ($self->{'_die_upon_destroy'})
235 0 204 unless exists $self->{'_os_obj'}
244 87 117 if ($result == 0 or $result == 1)
245 87 0 defined $exit_value ? :
259 64 124 unless exists $self->{'_os_obj'}
262 0 124 if exists $self->{'_exit_value'}
269 0 0 $_[0]{'_suspended'} ? :
275 0 0 unless $self->{'_os_obj'}
276 0 0 if $self->_suspend
283 0 0 unless $self->{'_os_obj'}
284 0 0 if $self->_resume
292 72 54 if exists $self->{'_exit_value'}
294 0 54 if $self->{'_suspended'}
297 0 54 unless exists $self->{'_os_obj'}
300 40 14 $self->_reap(1, $timeout_seconds) ? :
307 0 37 if $self->{'_autodie'} and not $self->{'_os_obj'}
310 11 26 unless $self->alive
313 0 26 @_ ? :
332 0 9 unless exists $_[0]{'_exit_value'}
337 0 0 unless exists $_[0]{'_exit_value'}
350 0 34 unless (@_ > 1)
355 0 34 unless ($timeout =~ /^\d+(?:\.\d*)?$/ or $timeout =~ /^\.\d+$/)
359 0 30 unless my $proc = "Proc::Background"->new(@_)
363 17 13 if defined $proc->wait($delay)
368 0 13 if ($t < $end_time - $delay) { }
376 13 17 if $alive
378 14 16 if (wantarray) { }