Branch Coverage

blib/lib/IO/Socket/Netlink.pm
Criterion Covered Total %
branch 75 114 65.7


line true false branch
117 0 7 unless (exists $$arg{'Protocol'})
121 0 7 unless $self->socket(16, $type, $$arg{'Protocol'})
123 0 7 unless $self->bind(pack_sockaddr_nl($$arg{'Pid'} || 0, $$arg{'Groups'} || 0))
125 3 4 if (ref $self eq 'IO::Socket::Netlink') { }
126 2 1 unless my $class = $protocol2pkg{$$arg{'Protocol'}}
273 0 2 unless defined $ret
307 0 0 unless defined $self->recv($buffer, $maxlen)
314 0 0 unless $message->nlmsg_flags & 2
321 0 0 if $message->nlmsg_type == 3
323 0 0 if $message->nlmsg_type != 1
326 0 0 unless defined $self->recv($buffer, $maxlen)
341 0 8 if (eval { do { require Sub::Name } }) { }
450 14 18 if @_
451 2 30 if (@_ and $$self{'nlmsg_type'} == 2)
454 7 25 unless $$self{'nlmsg_type'}
566 0 19 unless my $datafield = $args{'data'} or $no_data
568 0 19 unless ref(my $fields = $args{'fields'}) eq 'ARRAY'
570 0 19 unless $no_data or ref(my $packfunc = $args{'pack'}) eq 'CODE'
571 0 19 unless $no_data or ref(my $unpackfunc = $args{'unpack'}) eq 'CODE'
577 62 2 ref $f eq 'ARRAY' ? :
583 38 26 if ($type eq 'decimal') { }
8 18 elsif ($type eq 'hex') { }
18 0 elsif ($type eq 'bytes') { }
0 0 elsif ($type eq 'string') { }
603 0 64 if defined $opts{'default'}
609 61 95 if @_
610 121 35 defined $$self{$name} ? :
611 56 8 unless $opts{'no_accessor'}
619 4 5 if (@_)
625 11 8 unless $no_data
628 8 11 if (defined $datafield and not defined &{"${class}::${datafield}_string";})
693 8 7 unless @_
694 0 7 unless defined $nlmsg_type
696 1 6 unless my $pkg = $type2pkg{$nlmsg_type}
697 4 2 if ref $self eq $pkg
700 2 0 if (ref $self eq $class or $pkg eq $class)
736 0 3 unless my $fieldfunc = $class->can($fieldname)
747 0 16 unless my $packer = $class->can("pack_nlattr_$datatype")
749 0 16 unless my $unpacker = $class->can("unpack_nlattr_$datatype")
856 0 10 unless my $attrmap = $attr_byname{$class}
861 0 9 unless $$attrmap{$name}
875 0 8 unless my $attrmap = $attr_bytype{$class}
882 4 30 unless $$attrmap{$typeid}
894 9 5 if (@_) { }
920 0 1 unless my $attrmap = $attr_bytype{$class}
926 0 1 unless $$attrmap{$typeid}
928 1 0 if $name eq $wantname
954 0 2 unless my $attrmap = $attr_byname{$class}
960 0 3 unless $$attrmap{$name}
962 2 1 if (defined(my $value = $newvalues{$name})) { }
992 0 3 $type == 2 ? :
1 3 $type == 3 ? :
0 4 $type == 1 ? :
1017 1 5 if $flags & $val
1020 4 2 unless $flags
1023 0 4 if $flags
1025 1 3 @flags ? :