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];})
382 19 0 0 $self->{'dnscache'} and my $cached = $self->{'dnscache'}{$q->qtype . ':' . $q->qname}
414 0 0 0 $rec->{'sp'} and $rec->{'domain'} ne $self->{'domain'}[0]
441 0 0 0 $self->{'domain'} && $self->{'domain'}[0]
472 7 0 0 $record[0]{'pct'} < 100 and rand 100 < $record[0]{'pct'}
483 7 0 0 @{$self->{'domain'};} > 1 and $dom ne $self->{'domain'}[0]
511 0 7 0 $self->{'spf_result'} and ref $self->{'spf_result'}[0] eq 'ARRAY'
668 1 7 0 @hdr and defined $self->{'_hdrbuf'}
801 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'
286 0 0 $best || [0, 'neither DKIM nor SPF information']
327 20 12 $self->{'dkim_result'}[$i] // (last)
353 0 1 $sr->[2] && $sr->[2]{'problem'} && " ($sr->[2]{'problem'})" || ''
360 5 5 $self->{'spf_result'}[$i] // (last)
432 0 0 $self->{'result'}[1] // ''
547 0 0 $error || 'no DMARC records'
562 0 0 $error || 'no DMARC records'
682 0 7 $self->{'_from'} ||= []
686 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];})
304 0 7 0 $self->{'_dnsq'}{"TXT:_dmarc.$dom->[0]"} ||= 'Net::DNS::Packet'->new('_dmarc.' . $dom->[0], 'TXT')
334 3 5 0 $self->{'_dnsq'}{"TXT:$todo"} ||= 'Net::DNS::Packet'->new($todo, 'TXT')
626 0 3 0 not defined $rv[0] or $rv[0] ne ''
676 16 15 0 $self->{'spf'} || $self->{'spf_result'}
720 7 0 0 $self->{'spf_result'} || $self->{'spf'}
801 0 0 0 %hash || defined $comment
825 7 0 0 $ps->public_suffix($_[0], 1) || $_[0]