Branch Coverage

blib/lib/AnyEvent/Handle/UDP.pm
Criterion Covered Total %
branch 30 74 40.5


line true false branch
29 0 4 exists $args{'reuse_addr'} ? :
35 3 1 if exists $args{'bind'}
36 1 3 if exists $args{'connect'}
53 1 0 if @_
72 0 0 if (@_)
74 0 0 unless @{$self->{'buffers'};}
81 0 4 if defined $self->{'on_drain'}
118 2 0 if (@_)
121 0 2 if ($value == 0) { }
167 3 0 unless (&Scalar::Util::openhandle($fh))
168 0 3 unless socket $fh, $domain, $type, $proto
170 3 0 if $self->{'reuse_addr'}
173 3 0 if (bind $fh, $sockaddr) { }
180 3 0 if (ref $addr) { }
185 0 0 unless eval { do { &$bind_to(Socket::sockaddr_family($addr), 2, 0, $addr); 1 } }
200 1 0 unless (&Scalar::Util::openhandle($fh))
201 0 1 unless socket $fh, $domain, $type, $proto
205 1 0 if (connect $fh, $sockaddr) { }
212 0 1 if (ref $addr) { }
217 0 1 unless eval { do { &$connect_to(Socket::sockaddr_family($addr), 2, 0, $addr); 1 } }
237 3 0 if eval { do { &$on_success(@{$target;}); 1 } }
247 0 0 if (exists $self->{'on_error'}) { }
249 0 0 if $fatal
259 0 0 defined $to->[0] ? :
0 2 if ref $to
260 0 2 if defined wantarray
261 0 2 if ($self->{'autoflush'} and not @{$self->{'buffers'};}) { }
263 0 0 if not defined $ret and $non_fatal{$! + 0}
264 0 0 if $ret
274 1 1 defined $to ? :
275 0 0 unless defined $ret or $non_fatal{$! + 0}
276 2 0 if (defined $ret)
279 0 2 if defined $cv
288 2 0 if (@{$self->{'buffers'};}) { }
292 0 2 unless (defined $ret)
293 0 0 if $self->{'buffers'}
301 2 0 if not @{$self->{'buffers'};}