Branch Coverage

blib/lib/Gearman/Taskset.pm
Criterion Covered Total %
branch 28 96 29.1


line true false branch
75 1 4 unless &Scalar::Util::blessed($client) and $client->isa('Gearman::Client')
79 4 0 unless (ref $self)
97 0 2 unless $self->{'client'}
99 0 2 if ($self->{'default_sock'})
117 1 0 unless $name and $self->{'hooks'}{$name}
121 0 0 if $@
132 0 0 unless $name
134 0 0 if ($cb) { }
168 0 0 if ($self->{'default_sock'})
190 0 0 if (my $sock = $self->{'loaned_sock'}{$js_str})
191 0 0 if $sock->connected
209 0 0 if (exists $opts{'timeout'})
211 0 0 if defined $timeout
214 0 0 if keys %opts
225 0 0 unless $sock
226 0 0 if (my $fd = $sock->fileno)
233 0 0 $timeout ? :
237 0 0 if ($timeout and $time_left <= 0)
241 0 0 unless $nfound
244 0 0 unless vec $rout, $fd, 1
255 0 0 if ($@)
283 1 0 unless $jssock
289 0 0 unless $rv == $len
296 0 0 unless ($rv)
301 0 0 defined $rv ? :
318 0 6 if $self->{'default_sock'}
327 6 0 unless $jss
373 0 0 $res ? :
383 1 0 unless $sock
386 0 0 unless $pn
391 0 0 unless $s
392 0 0 if ($sock == $s)
399 0 0 if $hostport
402 0 0 $fam == 10 ? :
419 0 2 unless $shandle
422 0 2 unless my $task_list = $self->{'waiting'}{$shandle}
426 0 2 unless &Scalar::Util::blessed($task) and $task->isa('Gearman::Task')
432 2 0 unless @$task_list
446 3 4 unless &Scalar::Util::blessed($task) and $task->isa('Gearman::Task')
460 1 0 unless ($ipport)
466 0 0 if $task->{'background'}
472 1 2 unless $blob =~ /^$qr/
485 1 0 unless @$task_list
491 1 2 unless $blob =~ s/^(.+?)\0//
508 0 0 unless $blob =~ s/^(.+?)\0//
525 1 1 unless $blob =~ /^$qr/
554 1 1 unless ref $task_list eq 'ARRAY' and scalar @{$task_list;}
571 1 13 unless defined $type{$res->{'type'}}