Branch Coverage

blib/lib/Gearman/Server.pm
Criterion Covered Total %
branch 0 80 0.0


line true false branch
85 0 0 ref $class ? :
106 0 0 if (defined $wakeup)
107 0 0 if $wakeup < 0 and $wakeup != -1
114 0 0 if (defined $wakeup_delay)
115 0 0 if $wakeup_delay < 0 and $wakeup_delay != -1
120 0 0 if %opts
156 0 0 if keys %opts
160 0 0 $local_addr ? :
0 0 unless my $ssock = 'IO::Socket::INET'->new('LocalPort', $portnum, 'Type', 1, 'Proto', 6, 'Blocking', 0, 'Reuse', 1, 'Listen', 1024, $local_addr ? ('LocalAddr', $local_addr) : ())
202 0 0 unless socketpair $csock, $psock, 1, 1, 0
235 0 0 unless socketpair $csock, $psock, 1, 1, 0
242 0 0 unless (defined $pid)
248 0 0 unless ($pid)
252 0 0 unless open STDIN, '<&', $psock
254 0 0 unless open STDOUT, '>&', $psock
256 0 0 if (UNIVERSAL::isa($prog, 'CODE'))
274 0 0 wantarray ? :
281 0 0 if (defined(my $max_queue_size = $self->{'max_queue'}{$job->{'func'}}))
293 0 0 if ($highpri) { }
306 0 0 if (my $existing_timer = delete $self->{'wakeup_timers'}{$func})
310 0 0 unless $self->_wake_up_some($func)
315 0 0 if $delay == -1
318 0 0 if $self->{'wakeup'} == 0
326 0 0 unless $self->{'job_queue'}{$func}
0 0 unless @{[] unless $self->{'job_queue'}{$func};}
337 0 0 unless my $sleepmap = $self->{'sleepers'}{$func}
338 0 0 unless my $sleeporder = $self->{'sleepers_list'}{$func}
346 0 0 if $c->{'closed'} or not $c->{'sleeping'}
347 0 0 if ($max-- <= 0)
368 0 0 if ($self->{'job_queue'}{$cd})
377 0 0 if $count >= 2
385 0 0 if ($jobs_done) { }
416 0 0 if (my Gearman::Server::Client $worker = $job->worker)
420 0 0 if (length $job->{'uniq'})
429 0 0 if (defined $max and length $max and $max >= 0) { }
444 0 0 unless $self->{'job_of_uniq'}{$func}
456 0 0 unless $self->{'job_queue'}{$func}
466 0 0 unless $job
467 0 0 unless $job->require_listener
470 0 0 if $c and not $c->{'closed'}