Branch Coverage

blib/lib/IO/Async/Internals/Connector.pm
Criterion Covered Total %
branch 33 72 45.8


line true false branch
35 0 3 unless my $loop = delete $params{'loop'}
50 11 0 if (defined $err)
52 10 1 unless $err
59 0 0 if (defined getpeername $sock)
67 0 0 if (read $sock, my $buff, 1)
96 0 15 unless ($sock)
98 0 0 if $on_fail
102 0 15 if ($localaddr and not $sock->bind($localaddr))
104 0 0 if $on_fail
112 2 13 if ($ret) { }
2 22 elsif ($! != 115 and !0) { }
119 2 0 if $on_fail
132 10 1 unless $err
135 1 0 if $on_fail
148 3 0 if $connecterr
150 0 0 if $binderr
152 0 0 if $socketerr
172 0 9 if (exists $params{'host'} or exists $params{'local_host'} or exists $params{'local_port'})
175 0 6 unless defined $gai_hints{'socktype'} or defined $gai_hints{'protocol'}
179 6 9 if (exists $params{'host'} and exists $params{'service'}) { }
9 0 elsif (exists $params{'addrs'} or exists $params{'addr'}) { }
0 0 elsif (exists $params{'peer'}) { }
180 0 6 unless my $host = $params{'host'}
181 0 6 unless my $service = $params{'service'}
190 0 9 exists $params{'addrs'} ? :
198 7 2 if ($p_family == 2) { }
0 2 elsif ($p_family == 10) { }
199 0 7 if (Socket::unpack_sockaddr_in($p_addr))[1] eq "\0\0\0\0"
203 0 0 if (Socket::unpack_sockaddr_in6($p_addr))[1] eq "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"
212 0 0 unless builtin::blessed($peer) and $peer->isa("IO::Socket")
226 1 14 if (defined $params{'local_host'} or defined $params{'local_service'}) { }
0 14 elsif (exists $params{'local_addrs'} or exists $params{'local_addr'}) { }
238 0 0 exists $params{'local_addrs'} ? :
258 0 1 if $l_family and $p_family and $l_family != $p_family
259 0 1 if $l_socktype and $p_socktype and $l_socktype != $p_socktype
260 0 1 if $l_protocol and $p_protocol and $l_protocol != $p_protocol