Condition Coverage

blib/lib/Mail/SPF/Query.pm
Criterion Covered Total %
condition 32 125 25.6


and 3 conditions

line !l l&&!r l&&r condition
232 165 0 0 defined $$query{'ip'} and $$query{'ip'} =~ /$looks_like_ipv4/
247 165 0 0 $$query{'sanitize'} and not ref $$query{'sanitize'}
254 0 0 165 $$query{'ipv4'} and length $$query{'ipv4'}
424 0 1 164 $smtp_explanation && $smtp_why
456 164 0 1 $result eq 'pass' and $$query{'smtp_comment'} eq 'localhost is always allowed.'
775 0 0 0 defined $result and $result eq 'pass'
850 0 1696 0 ref $query and not $$query{'debug'}
860 0 0 1696 exists $$query{'debuglog'} and ref $$query{'debuglog'} eq 'CODE'
883 0 164 1 $$query{'ipv4'} and $$query{'ipv4'} =~ /^127\./
988 164 0 0 exists $$Domains_Queried{$cache_point} and not defined $$Domains_Queried{$cache_point}[0]
992 0 164 0 $query->max_lookup_count and $query->top->{'lookup_count'} > $query->max_lookup_count
1147 164 0 0 $maxlen and length $arg > $maxlen
1236 0 164 0 not $resquery and $errorstring eq 'NOERROR'
1495 0 0 0 defined $cidr_length and not $cidr_length =~ /^\d+$/
1675 0 164 0 not defined $txt and exists $$query{'fallback'}
1682 0 164 0 not defined $txt and defined $default_record
1743 0 0 0 $$lastmech[0] eq '-' || $$lastmech[0] eq '?' and $$lastmech[1] eq 'all'

or 2 conditions

line l !l condition
241 0 165 $$query{'spf_error_explanation'} ||= 'SPF record error'
301 165 0 $$query{'myhostname'} ||= 'localhost'
495 165 0 $$query{'ipv4'} || $$query{'ipv6'} || ''
975 0 656 $$query{'best_guess'} || 0
0 656 $$query{'guess_mechs'} || ''
1726 0 0 $prefix ||= '+'
1782 0 0 $$_[2] || ''

or 3 conditions

line l !l&&r !l&&!r condition
243 156 9 0 $$query{'default_explanation'} ||= $DEFAULT_EXPLANATION
247 0 165 0 $$query{'sanitize'} and not ref $$query{'sanitize'} or not defined $$query{'sanitize'}
424 1 0 0 $smtp_explanation || $smtp_why
757 0 0 0 shift() || $GUESS_MECHS
787 0 0 0 shift() || $TRUSTED_FORWARDER
1000 0 328 0 $$query{'max_lookup_count'} || $MAX_LOOKUP_COUNT
1010 0 0 0 not defined $CACHE_TIMEOUT or time - $cached[-1] > $CACHE_TIMEOUT
1225 0 0 164 /\.\./ or /^\./
1331 0 0 0 $result eq 'fail' or $result eq 'neutral'
0 0 0 $result eq 'fail' or $result eq 'neutral' or $result eq 'softfail'
1350 0 0 0 $argument || $$query{'domain'}
1386 0 0 0 $argument || $$query{'domain'}
1426 0 0 0 $argument || $$query{'domain'}
1495 0 0 0 not $network =~ /^\d+\.\d+\.\d+\.\d+$/ or defined $cidr_length and not $cidr_length =~ /^\d+$/
1529 174 0 0 $$query{'ipv4'} || $$query{'ipv6'}
1538 164 164 0 $$query{'res'} ||= 'Net::DNS::Resolver'->new('tcp_timeout', $DNS_RESOLVER_TIMEOUT, 'udp_timeout', $DNS_RESOLVER_TIMEOUT)
1552 0 0 0 {'-', 'fail', '+', 'pass', '~', 'softfail', '?', 'neutral'}->{$shorthand} || $shorthand
1561 0 0 0 {'fail', '-', 'pass', '+', 'softfail', '~', 'deny', '-', 'allow', '+', 'softdeny', '~', 'unknown', '?', 'neutral', '?'}->{$value} || $value
1671 0 164 0 $$query{'error'} or $$query{'last_dns_error'} eq 'NXDOMAIN'
1743 0 0 0 $$lastmech[0] eq '-' || $$lastmech[0] eq '?'