Branch Coverage

blib/lib/Parallel/ForkManager.pm
Criterion Covered Total %
branch 46 70 65.7


line true false branch
17 0 237 $tempdir ? :
31 237 0 unless (defined $tempdir and length $tempdir)
34 0 237 unless -e $tempdir and -d _
44 0 3405 if $s->{'in_child'}
47 0 2900 defined $s->{'on_wait_period'} ? :
50 3405 0 if ($s->{'max_proc'}) { }
52 0 3405 unless defined $pid
53 3306 99 if ($pid) { }
57 99 0 unless $pid
72 5 15 unless $self->start($identification)
81 98 0 if ($s->{'in_child'})
82 12 86 if (defined $r)
87 0 12 if (not $stored or $@)
93 0 0 if ($s->{'max_proc'} == 0)
103 2554 851 unless keys %{$$s{'processes'};}
120 853 3233 unless defined $kid
122 0 3233 if $kid == 0 or $kid == -1
123 0 3233 unless exists $s->{'processes'}{$kid}
129 45 3188 if (-e $storable_tempfile)
133 0 45 if (not $retrieved or $@)
141 0 3233 $? & 128 ? :
152 0 178 defined $s->{'on_wait_period'} ? :
175 0 1 if $nbr > $self->max_procs
190 3188 45 unless my $code = $s->{'on_finish'}{$pid} || $s->{'on_finish'}{'0'}
204 0 3078 if (ref $s->{'on_wait'} eq 'CODE')
206 0 0 if (defined $s->{'on_wait_period'})
207 0 0 unless defined $SIG{'CHLD'}
222 0 3306 if ref $s->{'on_start'} eq 'CODE'
243 1004 3082 $flag ? :
250 2694 1252 unless my $p = waitpid($pid, &WNOHANG)
252 1250 2 if $p != -1
266 1099 1983 if (my $sleep_period = $self->{'waitpid_blocking_sleep'})
270 1097 1100 if defined $pid
272 2 1098 unless $self->running_procs
284 137 100 if ($self->{'auto_cleanup'} and $self->{'parent_pid'} == $$ and -d $self->{'tempdir'})