Branch Coverage

blib/lib/POE/Component/Client/DNS.pm
Criterion Covered Total %
branch 71 90 78.8


line true false branch
44 1 7 if @_ % 2
48 2 5 unless $alias
51 2 5 unless $timeout
59 1 6 if scalar keys %params
105 1 12 if @_ % 2
108 1 11 unless exists $args{'event'}
109 1 10 unless exists $args{'context'}
110 1 9 unless exists $args{'host'}
152 16 52 if (ref $event eq 'HASH') { }
4 48 elsif (ref $event eq 'ARRAY') { }
156 13 3 unless $type
159 14 2 unless $class
162 1 15 unless $event
165 1 14 unless $context
169 1 13 if $args{'nameservers'}
172 1 13 unless $host
192 64 1 unless @nameservers
195 59 6 unless $timeout
204 11 54 if ($type eq 'A' || $type eq 'AAAA' and $class eq 'IN')
207 4 7 if (defined $address)
269 0 69 if ($remaining <= 0)
280 0 69 unless $$req{'nameservers'}
291 0 69 unless ($resolver_socket)
292 0 0 if $remaining > 1
317 0 8 unless defined $socket and $event eq $socket
320 0 8 unless $req
327 0 8 if ($remaining <= 0)
361 0 61 unless $req
375 0 61 if (defined $packet and not defined $packet->answerfrom)
377 0 0 if (defined $answerfrom)
428 52 13 if ($api_version < 3) { }
463 4 7 if (defined $$self[4]) { }
468 0 7 if $global_hosts_file and not -f $global_hosts_file
473 2 5 unless ($global_hosts_file)
478 0 2 if ($^O eq 'MSWin32' or $^O eq 'Cygwin')
490 0 2 unless -f $candidate
505 0 11 unless $use_hosts_file
508 1 10 unless -f $use_hosts_file
512 1 6 unless ($$self[5] == ($mtime || -1) and $$self[6] == ($ctime || -1) and $$self[7] == ($inode || -1) and $$self[9] == ($bytes || -1))
518 1 4 unless open HOST, '<', $use_hosts_file
522 0 17 if /^\s*\#/
523 0 17 if /^\s*$/
528 0 17 unless defined $address
530 11 6 $address =~ /:/ ? :
553 6 4 unless exists $$self[8]{$host} and exists $$self[8]{$host}{$type}