Branch Coverage

blib/lib/IO/Socket/Netlink.pm
Criterion Covered Total %
branch 77 116 66.3


line true false branch
121 0 7 unless (exists $arg->{'Protocol'})
125 0 7 unless $self->socket(16, $type, $arg->{'Protocol'})
127 0 7 unless $self->bind(pack_sockaddr_nl($arg->{'Pid'} || 0, $arg->{'Groups'} || 0))
129 3 4 if (ref $self eq 'IO::Socket::Netlink') { }
130 2 1 unless my $class = $protocol2pkg{$arg->{'Protocol'}}
291 0 2 unless defined $ret
327 0 0 unless defined $self->recv($buffer, $maxlen)
334 0 0 unless $message->nlmsg_flags & 2
341 0 0 if $message->nlmsg_type == 3
343 0 0 if $message->nlmsg_type != 1
346 0 0 unless defined $self->recv($buffer, $maxlen)
361 0 8 if (eval { do { require Sub::Name } }) { }
8 0 elsif (eval { do { require Sub::Util } }) { }
473 14 18 if @_
474 2 30 if (@_ and $self->{'nlmsg_type'} == 2)
477 7 25 unless $self->{'nlmsg_type'}
589 0 19 unless my $datafield = $args{'data'} or $no_data
591 0 19 unless ref(my $fields = $args{'fields'}) eq 'ARRAY'
593 0 19 unless $no_data or ref(my $packfunc = $args{'pack'}) eq 'CODE'
594 0 19 unless $no_data or ref(my $unpackfunc = $args{'unpack'}) eq 'CODE'
600 62 2 ref $f eq 'ARRAY' ? :
606 38 26 if ($type eq 'decimal') { }
8 18 elsif ($type eq 'hex') { }
18 0 elsif ($type eq 'bytes') { }
0 0 elsif ($type eq 'string') { }
626 0 64 if defined $opts{'default'}
632 61 95 if @_
633 121 35 defined $self->{$name} ? :
634 56 8 unless $opts{'no_accessor'}
642 4 5 if (@_)
648 11 8 unless $no_data
651 8 11 if (defined $datafield and not defined &{"${class}::${datafield}_string";})
716 8 7 unless @_
717 0 7 unless defined $nlmsg_type
719 1 6 unless my $pkg = $type2pkg{$nlmsg_type}
720 4 2 if ref $self eq $pkg
723 2 0 if (ref $self eq $class or $pkg eq $class)
759 0 3 unless my $fieldfunc = $class->can($fieldname)
770 0 16 unless my $packer = $class->can("pack_nlattr_$datatype")
772 0 16 unless my $unpacker = $class->can("unpack_nlattr_$datatype")
879 0 10 unless my $attrmap = $attr_byname{$class}
884 0 9 unless $attrmap->{$name}
898 0 8 unless my $attrmap = $attr_bytype{$class}
905 4 30 unless $attrmap->{$typeid}
917 9 5 if (@_) { }
943 0 1 unless my $attrmap = $attr_bytype{$class}
949 0 6 unless $attrmap->{$typeid}
951 1 5 if $name eq $wantname
977 0 2 unless my $attrmap = $attr_byname{$class}
983 0 3 unless $attrmap->{$name}
985 2 1 if (defined(my $value = $newvalues{$name})) { }
1015 0 3 $type == 2 ? :
1 3 $type == 3 ? :
0 4 $type == 1 ? :
1040 1 5 if $flags & $val
1043 4 2 unless $flags
1046 0 4 if $flags
1048 1 3 @flags ? :