Condition Coverage

blib/lib/Mail/DMARC/Iterator.pm
Criterion Covered Total %
condition 43 124 34.6


and 3 conditions

line !l l&&!r l&&r condition
83 3 0 4 $args{'ip'} and $args{'mailfrom'}
0 4 0 $args{'ip'} and $args{'mailfrom'} and $args{'helo'}
137 4 0 8 not $self->{'domain'} and defined $self->{'_hdrbuf'}
192 17 1 2 $self->{'dkim_sub'} and my $r = $self->{'dkim_result'}[0] = $self->{'dkim_sub'}->()
197 3 13 4 $self->{'dkim'} and not $self->{'dkim_result'}[1]
260 12 0 1 $dkim_result || !$self->{'dkim'} and $spf_result || !$self->{'spf'}
272 0 0 0 $_->[0] and $_->[0] > $best->[0]
278 0 0 1 $self->{'dkim_sub'} and !$best || $best->[0] != 1
0 1 0 $self->{'dkim_sub'} and !$best || $best->[0] != 1 and !$self->{'dkim_result'}[0] || grep({not $_->status;} @{$$self{'dkim_result'}[0];})
383 19 0 0 $self->{'dnscache'} and my $cached = $self->{'dnscache'}{$q->qtype . ':' . $q->qname}
416 0 0 0 $rec->{'sp'} and $rec->{'domain'} ne $self->{'domain'}[0]
444 0 0 0 $self->{'domain'} && $self->{'domain'}[0]
476 7 0 0 $record[0]{'pct'} < 100 and rand 100 < $record[0]{'pct'}
487 7 0 0 @{$self->{'domain'};} > 1 and $dom ne $self->{'domain'}[0]
514 0 7 0 $self->{'spf_result'} and ref $self->{'spf_result'}[0] eq 'ARRAY'
671 1 7 0 @hdr and defined $self->{'_hdrbuf'}
804 0 0 0 not %hash || defined $comment and /\G\(/cg

or 2 conditions

line l !l condition
154 0 0 $error ||= 'unknown error'
204 0 0 $_->status // ''
206 6 13 $_->status // (next)
229 0 0 $sr->[2]{'envelope-from'} || $sr->[2]{'helo'} || (last)
253 3 0 $sr->[3] // 'SPF Fail'
0 0 $sr->[3] // 'SPF SoftFail'
0 0 $sr->[3] // 'SPF PermError'
0 0 $sr->[3] // 'SPF TempError'
285 0 0 $best || [0, 'neither DKIM nor SPF information']
328 20 12 $self->{'dkim_result'}[$i] // (last)
354 0 1 $sr->[2] && $sr->[2]{'problem'} && " ($sr->[2]{'problem'})" || ''
361 5 5 $self->{'spf_result'}[$i] // (last)
434 0 0 $self->{'result'}[1] // ''
549 0 0 $error || 'no DMARC records'
564 0 0 $error || 'no DMARC records'
685 0 7 $self->{'_from'} ||= []
689 0 0 $self->{'_spfr'} ||= []

or 3 conditions

line l !l&&r !l&&!r condition
44 0 0 0 $_[$i] eq 'DebugFunc' or $_[$i] eq 'Debug'
207 0 0 0 $st == -2 or $st == -1
260 0 1 12 $dkim_result || !$self->{'dkim'}
0 1 0 $spf_result || !$self->{'spf'}
278 1 0 0 !$best || $best->[0] != 1
1 0 0 !$self->{'dkim_result'}[0] || grep({not $_->status;} @{$$self{'dkim_result'}[0];})
305 0 7 0 $self->{'_dnsq'}{"TXT:_dmarc.$dom->[0]"} ||= 'Net::DNS::Packet'->new('_dmarc.' . $dom->[0], 'TXT')
335 3 5 0 $self->{'_dnsq'}{"TXT:$todo"} ||= 'Net::DNS::Packet'->new($todo, 'TXT')
628 0 3 0 not defined $rv[0] or $rv[0] ne ''
679 16 15 0 $self->{'spf'} || $self->{'spf_result'}
723 7 0 0 $self->{'spf_result'} || $self->{'spf'}
804 0 0 0 %hash || defined $comment
828 7 0 0 $ps->public_suffix($_[0], 1) || $_[0]