Branch Coverage

blib/lib/Mail/SpamAssassin/Plugin/AskDNS.pm
Criterion Covered Total %
branch 2 158 1.2


line true false branch
258 0 0 if ($subtest =~ m[^ / (.+) / ([a-z]*) \z]sx) { }
0 0 elsif ($subtest =~ /^ m \s* \( (.+) \) ([a-z]*) \z/sx) { }
0 0 elsif ($subtest =~ /^ m \s* \[ (.+) \] ([a-z]*) \z/sx) { }
0 0 elsif ($subtest =~ /^ m \s* \{ (.+) \} ([a-z]*) \z/sx) { }
0 0 elsif ($subtest =~ /^ m \s* < (.+) > ([a-z]*) \z/sx) { }
0 0 elsif ($subtest =~ /^ m \s* (\S) (.+) \1 ([a-z]*) \z/sx) { }
0 0 elsif ($subtest =~ /^ (["']) (.*) \1 \z/sx) { }
0 0 elsif ($subtest =~ /^ \[ ( (?:[A-Z]+|\d+) (?: \s* , \s* (?:[A-Z]+|\d+) )* ) \] \z/six) { }
0 0 elsif ($subtest =~ m[^ ([^/-]+) (?: ([/-]) (.+) )? \z]sx) { }
259 0 0 $2 ne '' ? :
261 0 0 $2 ne '' ? :
263 0 0 $2 ne '' ? :
265 0 0 $2 ne '' ? :
267 0 0 $2 ne '' ? :
269 0 0 $2 ne '' ? :
276 0 0 if exists $rcode_value{$_}
277 0 0 if grep((!/^\d+\z/), @rcodes)
284 0 0 if (not defined $_) { }
0 0 elsif (/^\d{1,10}\z/) { }
0 0 elsif (/^0x[0-9a-zA-Z]{1,8}\z/) { }
0 0 elsif (/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\z/) { }
297 0 0 $any_quad_dot ? :
0 0 defined $n2 ? :
314 0 0 if (not defined $value or $value =~ /^$/) { }
0 0 elsif (not $value =~ /^ (\S+) \s+ (\S+) (?: \s+ ([A-Za-z0-9,]+) (?: \s+ (.*?) )? )? \s* $/sx) { }
322 0 0 unless defined $query_type
326 0 0 if (grep((!/^(?:ANY|A|AAAA|MX|TXT|PTR|NAPTR|NS|SOA|CERT|CNAME|DNAME| DHCID|HINFO|MINFO|RP|HIP|IPSECKEY|KX|LOC|SRV| SSHFP|SPF)\z/x), @answer_types))
331 0 0 if @answer_types > 1 or $answer_types[0] eq 'ANY'
332 0 0 if (defined $subtest)
334 0 0 unless defined $subtest
341 0 0 !@tags ? :
346 0 0 @answer_types == 1 && $answer_types[0] eq $query_type ? :
374 77 4 unless $pms->is_dns_available
382 0 0 if $depends_on_tags ne ''
384 0 0 if (would_log('dbg', 'askdns'))
394 0 0 if (not @tags) { }
402 0 0 @tags == 1 ? :
416 0 0 if ($depends_on_tags ne '')
430 0 0 if (grep $conf->{'scores'}{$_}, @rulenames) { }
431 0 0 !$answer_types_ref ? :
469 0 0 defined $current_tag_val{$1} ? :
476 0 0 if ($query_domain eq '') { }
479 0 0 if (not exists $pms->{'askdns_map_dnskey_to_rules'}{$dnskey}) { }
495 0 0 if $ent
498 0 0 unless @templ_tags
501 0 0 if ++$digit[$j] <= $#{$templ_vals{$templ_tags[$j]};}
503 0 0 if $j >= $#templ_tags
520 0 0 if ($pkt)
524 0 0 if @question
525 0 0 if $header
533 0 0 if (defined $rcode and exists $rcode_value{$rcode})
536 0 0 if exists $rcode_value{$rcode}
539 0 0 unless (@answer)
568 0 0 if (not $rr) { }
572 0 0 if ($rr_type eq 'A') { }
0 0 elsif ($rr->UNIVERSAL::can('txtdata')) { }
574 0 0 $rr->UNIVERSAL::can('address') ? :
576 0 0 if ($rr_rdatastr =~ /^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}\z/)
582 0 0 if ($txtdata_can_provide_a_list or $rr_type ne 'TXT') { }
589 0 0 $rr->UNIVERSAL::can('rdstring') ? :
591 0 0 if utf8::is_utf8($rr_rdatastr)
597 0 0 !ref($queries_ref) ? :
598 0 0 unless $q_tuple
601 0 0 if not defined $qtype or $query_type ne $qtype
602 0 0 unless defined $answer_types_ref
610 0 0 if (ref $subtest eq 'HASH') { }
0 0 elsif ($rcode != 0) { }
0 0 elsif (not defined $rr_type && grep(($_ eq 'ANY' || $_ eq $rr_type), @$answer_types_ref)) { }
0 0 elsif (not defined $subtest) { }
0 0 elsif (ref $subtest eq 'Regexp') { }
0 0 elsif ($rr_rdatastr eq $subtest) { }
0 0 elsif (defined $rdatanum and $subtest =~ m[^ (\d+) (?: ([/-]) (\d+) )? \z]x) { }
611 0 0 if $subtest->{$rcode}
620 0 0 if $rr_rdatastr =~ /$subtest/
626 0 0 $delim eq '/' ? :
0 0 $delim eq '-' ? :
0 0 !defined($n2) ? :
633 0 0 if ($match)
648 0 0 unless defined $rr_rdatastr