Branch Coverage

blib/lib/Parallel/ForkManager.pm
Criterion Covered Total %
branch 42 62 67.7


line true false branch
73 237 0 if ($args[0] =~ /^\d+$/) { }
75 0 237 if @args
89 0 2805 defined $s->{'on_wait_period'} ? :
92 3405 0 if ($s->{'max_proc'})
94 0 3405 unless defined $pid
95 3306 99 if ($pid) { }
115 5 15 unless $self->start($identification)
124 0 0 if ($s->{'max_proc'} == 0)
135 2554 851 unless keys %{$$s{'processes'};}
153 45 3191 if (-e $storable_tempfile)
157 0 45 if (not $retrieved or $@)
171 86 12 unless defined $data
177 0 12 if (not $stored or $@)
191 853 3236 unless defined $kid
193 0 3236 if $kid == 0 or $kid == -1
194 0 3236 unless exists $s->{'processes'}{$kid}
200 0 3236 $? & 128 ? :
211 0 178 defined $s->{'on_wait_period'} ? :
230 0 1 if $nbr > $self->max_procs
245 3191 45 unless my $code = $s->{'on_finish'}{$pid} || $s->{'on_finish'}{'0'}
259 0 2983 if (ref $s->{'on_wait'} eq 'CODE')
261 0 0 if (defined $s->{'on_wait_period'})
262 0 0 unless defined $SIG{'CHLD'}
277 0 3306 if ref $s->{'on_start'} eq 'CODE'
283 1102 2987 $flag ? :
290 2658 1350 unless my $p = waitpid($pid, &WNOHANG)
292 1348 2 if $p != -1
306 1099 1888 if (my $sleep_period = $self->{'waitpid_blocking_sleep'})
310 1097 1100 if defined $pid
312 2 1098 unless $self->running_procs
327 137 100 if $self->{'auto_cleanup'} and $self->{'parent_pid'} == $$ and -d $self->{'tempdir'}