Condition Coverage

blib/lib/Net/Server/Proto.pm
Criterion Covered Total %
condition 24 66 36.3


and 3 conditions

line !l l&&!r l&&r condition
47 58 0 41 defined $host && length $host
74 40 52 0 $ipv and not $ipv =~ /[46*]/
82 41 0 0 $ipv ne '4' and $proto ne 'ssl'
84 41 0 0 @rows > 1 and $rows[0][1] == 0
98 0 0 0 $ipv =~ /4/ and not $info->{'host'} =~ /:/
115 0 79 0 not $ENV{'NO_IPV6'} and eval { do { require Socket6; require IO::Socket::INET6 } }
132 0 0 0 scalar keys %ipv6mapped and grep {$ipv6mapped{$_->[0]};} @info
0 0 0 scalar keys %ipv6mapped and grep {$ipv6mapped{$_->[0]};} @info and not my $only = $class->_bindv6only
137 0 0 0 $host eq '*' and $i6->[0] eq '::'
0 0 0 $host eq '*' and $i6->[0] eq '::' and not length $only
0 0 0 $host eq '*' and $i6->[0] eq '::' and not length $only and not eval { do { die $! unless 'IO::Socket::INET6'->new->configure({'LocalAddr', '', 'LocalPort', 0, 'Listen', 1, 'ReuseAddr', 1, 'Domain', Socket6::AF_INET6()}) } }

or 2 conditions

line l !l condition
44 100 0 $info->{'port'} ||= 0
59 34 61 $proto || 'tcp'
72 27 40 $info->{'ipv'} || $ipv || $ENV{'IPV'} || ''
112 0 0 $port = (getservbyname $port, $proto)[2] or die "Could not determine port number from host [$host]:$_[2]\n"
136 0 0 $ipv6mapped{$i4->[0]} || (next)
176 0 0 readline $fh || (return '')

or 3 conditions

line l !l&&r !l&&!r condition
39 23 0 68 $port =~ s( (?<=[\w*\]]) [,|\s:/]+ (tcp|udp|ssl|ssleay|unix|unixdgram|\w+(?: ::\w+)+) $ )[]xi or $port =~ s[ / (\w+) $ ][]x
47 1 99 0 $info->{'host'} ||= defined $host && length $host ? $host : '*'
59 5 95 0 $info->{'proto'} ||= $proto || 'tcp'
76 40 1 51 not $ipv or $ipv =~ /[*]/
0 0 51 $ipv =~ /6/ or $info->{'host'} =~ /:/
78 0 0 0 $@ || "Could not find valid addresses for [$info->{'host'}]:$info->{'port'} with ipv set to '*'"
92 40 0 1 $_info->{'host'} ne $info->{'host'} or $_info->{'port'} ne $info->{'port'}