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'})
181 0 0 if ($prop->{'child_communication'})
202 0 0 unless ($prop->{'connected'})
210 0 0 if ($prop->{'serialize'} eq "flock")
211 0 0 unless open $prop->{'lock_fh'}, ">", $prop->{'lock_file'}
227 0 0 unless ($ok)
232 0 0 if $self->done
257 0 0 unless $chld > 0
276 0 1 if ($ENV{'HUP_CHILDREN'})
286 0 3 if (check_sigs())
287 0 0 if $prop->{'_HUP'}
292 0 3 unless (@fh)
298 0 3 if ($fh != $read_fh)
304 0 3 unless defined $line
306 0 3 if $self->parent_read_hook($line)
309 0 3 unless $line =~ /^(\d+)\ +(waiting|processing|dequeue|exiting)$/
312 3 0 if (my $child = $prop->{'children'}{$pid})
313 0 3 if ($status eq 'exiting') { }
319 0 3 unless --$prop->{'tally'}{$old_status} >= 0
324 2 1 if $status eq "processing"
348 0 0 unless $prop->{'children'}{$pid}
355 0 3 if ($time - $tally->{'time'} > $prop->{'check_for_spawn'})
369 0 0 if $p or $w
374 0 3 if ($total < $prop->{'min_servers'}) { }
0 6 elsif ($tally->{'waiting'} < $prop->{'min_spare_servers'} and $total < $prop->{'max_servers'}) { }
381 0 0 $n2 > $n1 ? :
385 0 3 if ($time - $prop->{'last_checked_for_waiting'} > $prop->{'check_for_waiting'})
389 0 0 if ($tally->{'waiting'} > $prop->{'max_spare_servers'} and $total > $prop->{'min_servers'}) { }
0 0 elsif ($total > $prop->{'max_servers'}) { }
393 0 0 if ($time - $prop->{'last_start'} > $prop->{'min_child_ttl'})
396 0 0 $n2 > $n1 ? :
405 0 3 if ($time - $prop->{'last_checked_for_dead'} > $prop->{'check_for_dead'})
408 0 0 unless (kill 0, $pid)
416 0 3 if ($time - $prop->{'last_process'} > 30 and $tally->{'waiting'} > $prop->{'min_spare_servers'})
419 0 0 $n2 > $n1 ? :
423 0 3 if (defined $prop->{'check_for_dequeue'})
424 0 0 if ($time - $prop->{'last_checked_for_dequeue'} > $prop->{'check_for_dequeue'})
426 0 0 if (defined $prop->{'max_dequeue'} and $tally->{'dequeue'} < $prop->{'max_dequeue'})
440 0 1 unless ($child)
445 0 1 unless exists $prop->{'children'}{$pid}
449 0 1 if ($exit)
453 0 0 if $signal
460 0 1 unless --$prop->{'tally'}{$status} >= 0
461 0 1 if $child->{'hup'}