Condition Coverage

blib/lib/AnyEvent/Handle/UDP.pm
Criterion Covered Total %
condition 11 32 34.3


and 3 conditions

line !l l&&!r l&&r condition
261 2 0 0 $self->{'autoflush'} and not @{$self->{'buffers'};}
263 0 0 0 not defined $ret and $non_fatal{$! + 0}

or 2 conditions

line l !l condition
29 0 4 $args{'receive_size'} || 1500
0 4 $args{'family'} || 0
0 4 $args{'autoflush'} || 0
0 4 $args{'on_bind'} || sub { }
0 4 $args{'on_connect'} || sub { }
0 4 $args{'fh'} || bless(&Symbol::gensym(), 'IO::Socket')
170 3 0 setsockopt $fh, 1, 2, 1 or die "Couldn't set so_reuseaddr: $!"

or 3 conditions

line l !l&&r !l&&!r condition
29 4 0 0 $args{'on_recv'} || Carp::croak('on_recv not given')
260 0 0 0 $cv ||= 'AnyEvent::CondVar'->new
275 2 0 0 defined $ret or $non_fatal{$! + 0}
302 0 2 0 $self->{'writer'} ||= &AE::io($self->{'fh'}, 1, sub { if (@{$self->{'buffers'};}) { while (my $entry = shift @{$$self{'buffers'};}) { do { my($msg, $to, $cv) = @{$entry;}; my $ret = $self->_send($msg, $to, $cv); unless (defined $ret) { unshift @{$$self{'buffers'};}, $entry if $self->{'buffers'}; last; } }; } ; } else { $self->_drained; } ; delete $self->{'writer'} if not @{$self->{'buffers'};}; } )