Branch Coverage

blib/lib/IO/Async/Listener.pm
Criterion Covered Total %
branch 38 58 65.5


line true false branch
206 11 7 if (grep exists $params{$_}, @acceptor_events)
207 0 11 unless grep(defined($_), @params{@acceptor_events}) <= 1
214 0 18 if exists $params{'on_read_ready'}
216 10 8 if (defined $params{'handle'}) { }
1 7 elsif (exists $params{'handle'}) { }
219 0 10 unless defined getsockname $handle
225 0 10 unless not defined $acceptconn or unpack "I", $acceptconn
228 0 10 if ref $handle eq "GLOB"
238 0 18 unless (grep $self->can_event($_), @acceptor_events)
243 2 52 if exists $params{$_}
246 0 18 if (keys %params)
260 1 9 if ($on_done = $self->can_event('on_stream')) { }
1 8 elsif ($on_done = $self->can_event('on_socket')) { }
8 0 elsif ($on_done = $self->can_event('on_accept')) { }
275 2 6 if (my $constructor = $self->{'handle_constructor'}) { }
0 6 elsif (my $class = $self->{'handle_class'}) { }
1 5 elsif ($self->can('handle_constructor')) { }
0 5 elsif ($self->can('handle_class')) { }
288 3 5 if $handle
296 0 10 unless my($result) = @_
301 0 0 unless $self->maybe_invoke_event("on_accept_error", $socket, $dollarbang)
317 10 0 if (defined $accepted) { }
0 0 elsif ($! == 11 or $! == 11) { }
319 5 5 if (my $handle = $params{'handle'}) { }
377 1 6 unless my $handle = $self->read_handle
393 0 2 unless my $sockname = $self->sockname
409 0 2 unless my $handle = $self->read_handle
444 0 1 unless defined $loop
446 1 0 if (my $on_listen = delete $params{'on_listen'})