Condition Coverage

blib/lib/Mail/SPF/Iterator.pm
Criterion Covered Total %
condition 64 112 57.1


and 3 conditions

line !l l&&!r l&&r condition
396 994 0 0 !$ip4 && $can_ip6 && eval { do { inet_pton(10, $ip) } }
667 10 122 116 $sub != \&Mail::SPF::Iterator::_got_TXT_exp and not $self->{'opt'}{'rfc4408'}
132 108 8 $sub != \&Mail::SPF::Iterator::_got_TXT_exp and not $self->{'opt'}{'rfc4408'} and --$self->{'limit_dns_void'} < 0
737 1585 0 0 not @ans and @names > 1
792 2687 112 20 $self->{'result'} and not @rv
854 1062 2 0 $self->{'tmpresult'} and $ResultQ{$self->{'tmpresult'}[0]} > $ResultQ{$rv[0]}
931 0 0 0 $domain->{'macro'} and my(@rv) = $self->_resolve_macro_p($domain)
1035 12 72 2378 $domain =~ /[^\d.]/ and $domain =~ s/^($rx)\.?$/$1/
1156 12 28 0 not $self->{'mech'} and my $default = $self->{'opt'}{'default_spf'}
1317 20 200 6 $qual eq 'Pass' and $_->[0] == \&Mail::SPF::Iterator::_mech_all
1447 0 0 275 $addr =~ /^[\d.]+$/ && eval { do { inet_aton($addr) } }
1555 6 0 40 $rr->type eq $atyp and exists $mx{$rr->name}
1951 0 2 20 ref $rec && $rec->{'ip'}

or 2 conditions

line l !l condition
486 0 0 $timeout || 20
507 0 0 $answer || [$q, $resolver->errorstring]
583 34 0 $err ||= 'unknown error'
1198 534 1034 $qual or '+'
1222 12 0 eval { do { $ip = inet_pton(10, $ip) } } or die "bad ip '${ip}' in '${_}'\n"
1229 282 232 $arg ||= ''
1245 72 0 $err[2]{'problem'} || 'Invalid domain name'
1255 20 30 $arg || ''
1264 52 6 $arg || ''
1271 152 12 $arg || ''
1285 138 0 $arg || ''
1288 6 0 $err[2]{'problem'} || 'Invalid domain name'
1294 152 0 $arg || ''
1297 12 0 $err[2]{'problem'} || 'Invalid domain name'
1307 30 0 $arg || ''
1865 10 222 $macro_delim ||= '.'
1885 0 0 $self->{'myname'} || 'unknown'

or 3 conditions

line l !l&&r !l&&!r condition
282 5 0 0 eval { do { require Socket; 'Socket'->import('inet_pton', 'inet_ntop'); 'Socket'->import('AF_INET6') unless defined &Mail::SPF::Iterator::AF_INET6; 1 } } || eval { do { require Socket6; 'Socket6'->import('inet_pton', 'inet_ntop'); 'Socket6'->import('AF_INET6') unless defined &Mail::SPF::Iterator::AF_INET6; 1 } }
397 994 0 0 $ip4 or $ip6
487 0 0 0 $resolver ||= 'Net::DNS::Resolver'->new
510 0 0 0 $status or @ans
536 0 3289 1436 $v eq '' or $v =~ m[[^0-9a-zA-Z!#$%&'*+\-/=?^_`{|}~]]
631 30 0 4 not $self->{'tmpresult'} or $ResultQ{$self->{'tmpresult'}[0]} < $ResultQ{&SPF_TempError}
665 248 0 1585 not @answer or $rcode ne 'NOERROR'
825 0 72 44 $rv[0] eq 'TempError' or $rv[0] eq 'PermError'
1032 458 2004 0 $rx ||= qr/.*?/
1200 358 156 272 $mech eq 'a' or $mech eq 'mx'
1632 34 0 0 $self->{'clientip4'} || $self->{'clientip6'}
1886 62 0 0 $self->{'clientip4'} || $self->{'clientip6'}
1978 0 0 20 $rcode ne 'NOERROR' or not @$ans