Branch Coverage

blib/lib/Zonemaster/Engine/Zone.pm
Criterion Covered Total %
branch 43 54 79.6


line true false branch
30 3 389 if ($self->name eq '.')
35 0 389 unless $pname
43 0 386 unless ($self->parent)
49 5 381 unless defined $p
67 0 377 if ($self->name eq '.')
77 373 3 if defined $p and $p->type eq 'answer' and $p->rcode eq 'NOERROR'
80 3 374 unless defined $p
89 131 377 if ($self->name eq '.')
102 0 1 unless ($self->parent)
107 0 1 unless defined $p
122 4 187 if (not 'Zonemaster::Engine'->config->ipv4_ok and $ns->address->version == 4)
127 3 184 if (not 'Zonemaster::Engine'->config->ipv6_ok and $ns->address->version == 6)
133 184 0 if defined $p
147 0 46 unless ('Zonemaster::Engine'->config->ipv4_ok)
153 0 46 unless ('Zonemaster::Engine'->config->ipv6_ok)
168 4 93 if (not 'Zonemaster::Engine'->config->ipv4_ok and $ns->address->version == 4)
173 3 90 if (not 'Zonemaster::Engine'->config->ipv6_ok and $ns->address->version == 6)
179 75 15 if ($p and $p->aa)
196 4 511 if (not 'Zonemaster::Engine'->config->ipv4_ok and $ns->address->version == 4)
201 3 508 if (not 'Zonemaster::Engine'->config->ipv6_ok and $ns->address->version == 6)
207 422 86 if ($p and scalar $p->get_records_for_name($type, $name) > 0)
221 56 0 if (not ref $name or ref $name ne 'Zonemaster::Engine::DNSName')
225 17 39 if (scalar @{$self->name->labels;} != $self->name->common($name))
230 1 38 unless ($p)
234 0 38 if ($p->is_redirect)
240 0 38 unless ($soa)
244 9 29 if ('Zonemaster::Engine::DNSName'->new($soa->name) eq $self->name) { }