Branch Coverage

blib/lib/AnyEvent/Ping.pm
Criterion Covered Total %
branch 19 46 41.3


line true false branch
28 2 0 unless defined $interval
31 1 1 unless defined $timeout
34 2 0 unless (defined $packet_generator)
36 2 0 unless defined $packet_size
53 1 1 if (my $on_prepare = $args{'on_prepare'})
75 0 2 unless 'IO::Socket::INET'->new('Proto', 'icmp', 'Type', 3, 'Blocking', 0)
82 0 13 @_ > 1 ? :
84 0 19 @_ > 1 ? :
125 2 0 if exists $self->{'_socket'}
143 8 11 if exists $self->{'_poll_write'}
170 0 0 unless $request
172 0 0 if ($type == $ICMP_ECHOREPLY) { }
0 0 elsif ($type == $ICMP_DEST_UNREACH) { }
0 0 elsif ($type == $ICMP_TIME_EXCEEDED) { }
175 0 0 if ($data eq $request->{'data'}) { }
199 0 0 if ($type == $ICMP_ECHOREPLY) { }
0 0 elsif ($type == $ICMP_DEST_UNREACH or $type == $ICMP_TIME_EXCEEDED) { }
217 0 0 unless $request
220 0 0 unless $sequence == @{$request->{'results'};} + 1
234 5 13 if (@$results == $request->{'times'} or $result eq 'ERROR') { }
239 5 0 if ($tasks->[$i] == $request)
297 1 18 unless $socket->send($msg, 0, $request->{'destination'})
310 0 19 if length($msg) % 2