Branch Coverage

blib/lib/Net/Async/Ping/ICMP.pm
Criterion Covered Total %
branch 28 72 38.8


line true false branch
51 0 2 unless $fh->socket(2, 3, 1)
56 0 2 if ($self->bind)
57 0 0 unless $fh->bind(pack_sockaddr_in(0, inet_aton($self->bind)))
62 0 8 unless my $self = shift()
67 4 4 unless defined $from_data and ref $from_data eq 'HASH'
75 0 4 unless defined $f and $from_data->{'id'} == $self->_pid and $from_data->{'seq'} == $self->seq
77 4 0 if ($from_data->{'type'} == 0) { }
0 0 elsif ($from_data->{'type'} == 3) { }
0 0 elsif ($from_data->{'type'} == 11) { }
132 0 8 unless defined $offset
147 4 4 if ($from_type == 0) { }
0 4 elsif ($from_type == 3) { }
150 0 4 if $err
152 4 0 if length $recv_msg >= $offset + 8
166 0 0 if $ipv4->protocol != 1
172 0 0 if $to_type != 8
197 2 0 unless keys %params
206 4 4 if my $legacy = &blessed($_[0])
207 4 4 $legacy ? :
221 0 6 if $err
228 0 6 if ($self->use_ping_socket)
230 0 0 if ($ping_fh->socket(2, 2, 1))
233 0 0 if ($self->bind)
234 0 0 unless $ping_fh->bind(pack_sockaddr_in(0, inet_aton($self->bind)))
240 0 0 unless my $self = shift()
250 0 0 unless $from_data->{'ip'} eq $dst_ip and $from_data->{'seq'} == $self->seq
252 0 0 if ($from_data->{'type'} == 0) { }
0 0 elsif ($from_data->{'type'} == 3) { }
0 0 elsif ($from_data->{'type'} == 11) { }
276 0 0 $legacy ? :
282 6 0 unless (defined $socket)
285 2 4 unless ($self->_is_raw_socket_setup_done)
286 1 1 $legacy ? :
292 6 0 unless ($ping_socket)
293 0 6 if (exists $self->_raw_socket_queue->{$dst_ip})
310 0 6 if ($ping_socket) { }