Branch Coverage

blib/lib/Net/Server/PreFork.pm
Criterion Covered Total %
branch 37 128 28.9


line true false branch
54 0 1 if not !defined($prop->{'min_servers'}) and $d->{'min_servers'} > $prop->{'max_servers'}
56 0 1 if not defined $prop->{'max_spare_servers'} and $d->{'max_spare_servers'} >= $prop->{'max_servers'}
57 0 1 unless (defined $prop->{'min_spare_servers'})
58 0 0 defined $prop->{'min_servers'} ? :
59 0 0 if $prop > $min
63 4 2 unless defined $prop->{$_} and $prop->{$_} =~ /^\d+(?:\.\d+)?$/
66 0 1 if ($prop->{'max_spare_servers'} >= $prop->{'max_servers'})
70 0 1 if ($prop->{'min_spare_servers'})
91 0 1 if ($ENV{'HUP_CHILDREN'})
93 0 0 $line =~ /^(\d+)\t(\w+)$/ ? :
116 0 0 unless $n > 0
119 0 0 unless $time - $prop->{'last_kill'} > 10
129 0 0 if $child->{'status'} ne 'waiting'
133 0 0 unless (kill 'HUP', $pid)
137 0 0 if $n <= 0
144 0 1 unless $n > 0
154 1 0 if ($prop->{'child_communication'})
162 0 1 unless (defined $pid)
163 0 0 if ($prop->{'child_communication'})
170 1 0 if ($pid) { }
171 1 0 if ($prop->{'child_communication'})
180 0 0 if ($prop->{'child_communication'})
201 0 0 unless ($prop->{'connected'})
209 0 0 if ($prop->{'serialize'} eq 'flock')
210 0 0 unless open $prop->{'lock_fh'}, '>', $prop->{'lock_file'}
226 0 0 unless ($ok)
231 0 0 if $self->done
256 0 0 unless $chld > 0
275 0 1 if ($ENV{'HUP_CHILDREN'})
285 0 3 if (check_sigs())
286 0 0 if $prop->{'_HUP'}
291 0 3 unless (@fh)
297 0 3 if ($fh != $read_fh)
303 0 3 unless defined $line
305 0 3 if $self->parent_read_hook($line)
308 0 3 unless $line =~ /^(\d+)\ +(waiting|processing|dequeue|exiting)$/
311 3 0 if (my $child = $prop->{'children'}{$pid})
312 0 3 if ($status eq 'exiting') { }
318 0 3 unless --$prop->{'tally'}{$old_status} >= 0
323 2 1 if $status eq 'processing'
347 0 0 unless $prop->{'children'}{$pid}
354 0 3 if ($time - $tally->{'time'} > $prop->{'check_for_spawn'})
368 0 0 if $p or $w
373 0 3 if ($total < $prop->{'min_servers'}) { }
0 6 elsif ($tally->{'waiting'} < $prop->{'min_spare_servers'} and $total < $prop->{'max_servers'}) { }
380 0 0 $n2 > $n1 ? :
384 0 3 if ($time - $prop->{'last_checked_for_waiting'} > $prop->{'check_for_waiting'})
388 0 0 if ($tally->{'waiting'} > $prop->{'max_spare_servers'} and $total > $prop->{'min_servers'}) { }
0 0 elsif ($total > $prop->{'max_servers'}) { }
392 0 0 if ($time - $prop->{'last_start'} > $prop->{'min_child_ttl'})
395 0 0 $n2 > $n1 ? :
404 0 3 if ($time - $prop->{'last_checked_for_dead'} > $prop->{'check_for_dead'})
407 0 0 unless (kill 0, $pid)
415 0 3 if ($time - $prop->{'last_process'} > 30 and $tally->{'waiting'} > $prop->{'min_spare_servers'})
418 0 0 $n2 > $n1 ? :
422 0 3 if (defined $prop->{'check_for_dequeue'})
423 0 0 if ($time - $prop->{'last_checked_for_dequeue'} > $prop->{'check_for_dequeue'})
425 0 0 if (defined $prop->{'max_dequeue'} and $tally->{'dequeue'} < $prop->{'max_dequeue'})
439 0 1 unless ($child)
444 0 1 unless exists $prop->{'children'}{$pid}
448 0 1 if ($exit)
452 0 0 if $signal
459 0 1 unless --$prop->{'tally'}{$status} >= 0
460 0 1 if $child->{'hup'}