Branch Coverage

blib/lib/Gearman/Task.pm
Criterion Covered Total %
branch 49 74 66.2


line true false branch
190 17 0 unless (ref $self)
195 0 17 unless $self->{'func'} = shift()
198 0 17 unless ref $self->{'argref'} eq 'SCALAR'
226 1 16 if (%{$opts;})
243 6 1 unless $name and $self->{'hooks'}{$name}
246 0 1 if $@
257 0 2 unless $name
259 1 1 if (@_) { }
295 3 3 unless @_
299 1 2 unless &Scalar::Util::blessed($ts) and $ts->isa('Gearman::Taskset')
303 2 0 if (my $hash_num = $self->hash) { }
322 3 3 $self->{'uniq'} && $self->{'uniq'} eq '-' ? :
323 6 0 if (${$merge_on;}) { }
339 0 0 unless ref $client
356 1 4 if $self->{'is_finished'}
359 1 3 if ($self->{'retries_done'} < $self->{'retry_count'})
361 1 0 if $self->{'on_retry'}
390 0 4 if $self->{'is_finished'}
395 3 1 if $self->{'on_fail'}
396 0 4 if $self->{'on_post_hooks'}
418 2 0 if $self->{'on_exception'}
430 0 2 if $self->{'is_finished'}
436 2 0 if $self->{'on_complete'}
437 0 2 if $self->{'on_post_hooks'}
447 0 2 if $self->{'is_finished'}
448 0 2 unless $self->{'on_status'}
461 0 2 if $self->{'is_finished'}
464 2 0 if $self->{'on_data'}
475 0 1 if $self->{'is_finished'}
476 0 1 unless $self->{'on_warning'}
497 2 0 if (@_)
586 0 1 if (@_)
601 6 3 if ($self->_priority ne 'normal')
605 4 5 if ($self->{'background'})
638 2 33 if ($self->{'high_priority'})
647 6 29 if ($priority)
648 0 6 unless $priority =~ /^(high|normal|low)$/