Branch Coverage

lib/AnyEvent/Worker.pm
Criterion Covered Total %
branch 29 94 30.8


line true false branch
92 0 0 if ($VERSION != $version)
102 0 0 ref $WORKER eq 'CODE' ? :
107 0 0 unless sysread $fh, $rbuf, 16384, length $rbuf
114 0 0 unless $len and $len + 4 <= length $rbuf
121 0 0 if (ref $WORKER eq 'CODE') { }
133 0 0 ref $@ ? :
0 0 if $@
139 0 0 unless defined $wr or $!{'EINTR'}
145 0 0 if $@
149 0 0 unless open my $fh, ">>&=$_[0]"
167 0 5 unless my($client, $server) = &AnyEvent::Util::portable_socketpair()
184 0 6 unless $self
190 5 1 if ($len > 0) { }
1 0 elsif (defined $len) { }
0 0 elsif ($! != 11) { }
197 5 6 unless $len and $len + 4 <= length $rbuf
201 0 6 unless $self
204 3 3 if (defined $$res[0]) { }
218 4 2 if $self and not @{$$self{'queue'};}
233 0 0 if ($$self{'timeout'} and $$self{'last_activity'}) { }
234 0 0 if ('AnyEvent'->now > $$self{'last_activity'} + $$self{'timeout'}) { }
253 0 0 unless $self
257 0 0 unless my $len = syswrite($client, $$self{'wbuf'})
266 5 0 if ($pid) { }
0 0 elsif (defined $pid) { }
277 0 0 if (ref $cb eq 'CODE') { }
0 0 elsif (ref $cb eq 'ARRAY') { }
0 0 elsif (ref $cb eq 'HASH') { }
282 0 0 unless $class->can('new')
286 0 0 unless my $class = $$cb{'class'}
288 0 0 unless $class->can($new)
289 0 0 unless $$cb{'args'}
323 0 6 if $_[0] =~ / during global destruction\.\s*$/u
327 5 1 if ($child_pid)
330 0 5 unless kill 0, $child_pid and kill 'TERM', $child_pid or $!{'ESRCH'}
332 0 5 if $GD
362 0 3 if $_[0] =~ / during global destruction\.\s*$/u
369 3 0 if (kill 0, $_)
370 0 3 unless kill 'KILL', $_
388 1 0 if ($fatal)
396 1 1 unless $caller
406 1 0 if ($$self{'on_error'}) { }
411 0 0 if ($fatal) { }
456 0 8 unless ($$self{'fh'})
466 0 8 if ($$self{'timeout'} and not $$self{'tw'})
473 8 0 unless ($$self{'ww'})
478 0 8 if length $$self{'wbuf'}