Branch Coverage

blib/lib/EV/cares.pm
Criterion Covered Total %
branch 79 80 98.7


line true false branch
63 1 10 unless defined $ip
64 6 4 if (my(@oct) = $ip =~ /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})\z/u)
66 1 17 if length $o > 1 and $o =~ /^0/u
68 1 16 if $o > 255
72 3 1 if ($ip =~ /:/u)
74 1 2 unless my $packed = Socket::inet_pton(Socket::AF_INET6(), $ip)
87 1 6 if length $buf < 12
111 2 5 unless ref $names eq "ARRAY"
113 1 4 unless ref $cb eq "CODE"
115 1 3 if $self->is_destroyed
116 1 2 unless @$names
125 2 1 if --$pending == 0
134 1 4 unless ref $names eq "ARRAY"
136 1 3 unless ref $cb eq "CODE"
138 1 2 if $self->is_destroyed
139 1 1 unless @$names
148 1 1 if --$pending == 0
157 1 6 unless ref $ips eq "ARRAY"
159 1 5 unless ref $cb eq "CODE"
161 1 4 if $self->is_destroyed
162 1 3 unless @$ips
172 2 4 unless Socket::inet_pton(Socket::AF_INET(), $ip) or Socket::inet_pton(Socket::AF_INET6(), $ip)
182 1 1 if --$pending == 0
191 1 4 unless ref $nodes eq "ARRAY"
193 1 3 unless ref $cb eq "CODE"
195 1 2 if $self->is_destroyed
196 1 1 unless @$nodes
205 1 1 if --$pending == 0
228 1 5 if $self->is_destroyed
229 4 1 unless $self->active_queries
240 1 0 $self->active_queries ? :
249 5 5 if (@_ == 4) { }
4 1 elsif (@_ == 5) { }
254 1 3 unless &Scalar::Util::looks_like_number($class)
259 1 7 unless ref $names eq "ARRAY"
261 2 5 unless ref $cb eq "CODE"
263 1 4 if $self->is_destroyed
264 2 2 unless @$names
273 2 1 if --$pending == 0
275 1 2 defined $class ? :