Branch Coverage

blib/lib/IO/Socket/Packet.pm
Criterion Covered Total %
branch 16 58 27.5


line true false branch
108 0 3 unless $self->socket(17, $type, 0)
113 0 3 if exists $arg->{'Protocol'}
114 2 1 if exists $arg->{'IfIndex'}
116 1 0 if (not defined $ifindex and exists $arg->{'IfName'})
118 0 1 unless defined $ifindex
121 0 3 defined $protocol ? :
0 3 unless $self->bind(pack_sockaddr_ll(defined $protocol ? $protocol : 3, $ifindex || 0, 0, 0, ""))
165 0 0 if (defined do { *$self }->{'packet_rx_ring'})
166 0 0 unless defined $self->wait_ring_frame(my $buffer, \my %info)
184 0 0 unless my($addr, $len) = $self->recv_len(@_)
264 0 1 if (defined do { *$self }->{'packet_ts_sec'})
268 0 0 wantarray ? :
294 0 0 if (defined do { *$self }->{'packet_ts_sec'})
298 0 0 wantarray ? :
330 0 1 if (ref $self) { }
334 0 1 unless socket $sock, 2, 1, 0
358 0 2 if (ref $self) { }
362 0 2 unless socket $sock, 2, 1, 0
378 1 1 if (@_) { }
404 0 0 unless defined $ifindex
424 0 0 unless defined $ifindex
444 0 0 unless defined $ifindex
446 0 0 $value ? :
464 0 0 unless defined $ifindex
466 0 0 $value ? :
486 0 1 unless my $stats = $self->getsockopt(263, 6)
539 0 0 if defined $ret
591 0 0 unless $self->blocking
595 0 0 unless select $rvec, undef, undef, undef