Branch Coverage

blib/lib/POE/Component/Client/DNS/Recursive.pm
Criterion Covered Total %
branch 46 78 58.9


line true false branch
31 0 6 unless $opts{'host'}
33 0 6 unless $opts{'event'}
34 5 1 unless $opts{'nameservers'} and ref $opts{'nameservers'} eq "ARRAY"
77 0 6 if ($kernel == $sender and not $runstate->{'session'})
81 0 6 if ($runstate->{'session'}) { }
82 0 0 if (my $ref = $kernel->alias_resolve($runstate->{'session'})) { }
93 4 2 unless ref $runstate->{'event'} eq "POE::Session::AnonEvent"
112 1 6 if (scalar @{$runstate->{'nameservers'};}) { }
131 0 26 if ($err)
139 0 26 unless (send($socket, $data, 0, $ai->{'addr'}) == length $data)
153 6 1 if (my(@ans) = $packet->answer)
155 78 0 if ($rr->name =~ /^\.?$/ and $rr->type eq "NS")
164 88 0 if (my $server = lc $rr->name)
165 72 16 if ($rr->type eq "A")
166 72 0 if ($hints{$server})
173 2 5 if ($runstate->{'trace'})
174 1 1 if (ref $runstate->{'trace'} eq 'POE::Session::AnonEvent') { }
183 1 6 unless (scalar @ns)
197 3 0 if (scalar @{$hints;}) { }
0 0 elsif (defined $runstate->{'nameservers'}) { }
216 1 15 if ($status ne "NOERROR")
220 5 10 if (my(@ans) = $packet->answer) { }
222 5 0 unless (scalar @{$runstate->{'qstack'};})
231 4 6 if ($runstate->{'trace'})
236 0 10 unless (scalar @ns)
265 0 0 unless ($nameserver)
266 0 0 if (scalar @{$runstate->{'qstack'};}) { }
269 0 0 unless ($host)
289 0 0 unless ($nameserver)
305 0 1 if (ref $runstate->{'event'} eq 'POE::Session::AnonEvent') { }
323 2 3 if (ref $runstate->{'event'} eq 'POE::Session::AnonEvent') { }
337 10 0 if (my(@ans) = $packet->authority)
339 85 0 if ($rr->type eq "NS")
347 101 0 if (my $server = lc $rr->name)
348 64 0 if $rr->type eq "A" and $hints{$server}
359 0 23 unless ($socket->recv($message, 512))
364 0 23 if ($@)
368 0 23 unless ($len)
379 136 27 if scalar @{$hashref->{$ns};}