Branch Coverage

blib/lib/Zonemaster/Engine/Recursor.pm
Criterion Covered Total %
branch 60 70 85.7


line true false branch
32 27 50 if (exists $recurse_cache{$name}{$type}{$class})
53 392 14 if (name($state->{'trace'}[0][0]) eq name($name)) { }
61 8 398 if ($name->next_higher ne $pname)
66 4 4 if ($source_ns)
68 3 1 if ($source_ns->can('query')) { }
75 4 0 if ($pp)
77 1 3 if ($rr)
84 5 401 if (wantarray) { }
96 0 6422 if ($state->{'in_progress'}{$name}{$type})
102 17418 1968 $ns->can('name') ? :
103 17418 1968 $ns->can('address') ? :
116 49 19337 unless $p
118 55 19282 if ($p->rcode eq 'REFUSED' or $p->rcode eq 'SERVFAIL')
124 601 18681 if ($p->no_such_record)
128 22 18659 if ($p->no_such_name)
132 5795 12864 if ($self->_is_answer($p))
138 12864 0 if ($p->is_redirect)
141 1 12863 if $zname eq '.'
143 0 12863 if $state->{'seen'}{$zname}
149 0 12863 if $common < $state->{'common'}
154 0 12863 if $state->{'count'} > 20
160 1 3 if $state->{'candidate'}
168 17419 1968 if (ref $ns and $ns->can('query')) { }
1 1967 elsif (my $href = $state->{'glue'}{lc name($ns)}) { }
171 17379 40 if ($p)
172 52939 106532 unless $_->type eq 'A'
182 1 0 if ($p)
190 1962 5 if (@addr > 0) { }
195 1958 4 if $p
214 113572 4017 if (exists $state->{'glue'}{lc name($name)}) { }
224 0 275122 unless $a->name cmp $b->name
248 10 2978 if ($pa and $pa->no_such_name)
265 2978 0 if ($pa)
269 2978 0 if ($paaaa)
275 5365 2061 if (name($rr->name) eq $name or $cname{$rr->name})