Condition Coverage

blib/lib/Mail/DKIM/Iterator.pm
Criterion Covered Total %
condition 77 163 47.2


and 3 conditions

line !l l&&!r l&&r condition
108 22 0 22 $self->{'extract_sig'} and my(@sig) = _parse_header($self->{'header'})
163 0 0 0 $self->{'header'} and $self->{'sig'}
226 96 0 1 $sig->{'x'} and $sig->{'x'} < time
233 78 0 18 $txt and !ref($txt) || ref $txt eq 'ARRAY'
77 0 1 exists $self->{'records'}{$dns} and not $txt
268 63 2 0 $v->{'l'} and not $v->{'l'} =~ /^\d{1,76}\z/
299 42 2 0 defined $v->{'x'} and not $v->{'x'} =~ /^\+?\d{1,12}\z/
303 0 0 21 $v->{'b'} && ($v->{'b:bin'} = _decode64($v->{'b'}))
0 0 21 $v->{'bh'} && ($v->{'bh:bin'} = _decode64($v->{'bh'}))
21 0 0 $v->{'t'} and not $v->{'t'} =~ /^\d{1,12}\z/
310 1 0 0 $v->{'t'} and $v->{'x'} < $v->{'t'}
355 0 1 17 $v and %$v
395 0 2 20 ref $sig and $sig->{'h_auto'}
406 120 0 20 exists $oh{$k} and --$oh{$k} == 0
415 0 22 0 not $sig{'t'} and exists $sig{'t'}
417 21 1 0 $sig{'x'} and $sig{'x'} =~ /^\+(\d+)$/
478 0 0 22 $dkh =~ /\n([^\n]+)\z/ && length $1
495 38 57 1 defined $sig->{'bh:computed'} and $sig->{'bh:computed'} ne $sig->{'bh:bin'}
512 17 0 0 $param->{'t'}{'s'} and $sig->{'i:domain'}
0 0 0 $param->{'t'}{'s'} and $sig->{'i:domain'} and $sig->{'i:domain'} ne $sig->{'d'}
515 17 0 0 $param->{'g'} and not $sig->{'i'} =~ /$param->{'g'}/
725 1 0 43 not $sig->{'error'} and my $digest = $digest{$sig->{'a:hash'}}()
1 0 43 not $sig->{'error'} and my $digest = $digest{$sig->{'a:hash'}}() and my $transform = $bodyc{$sig->{'c:body'}}()
867 0 0 0 defined $self->[3] and $self->[3] ne ''

or 2 conditions

line l !l condition
65 0 44 $args{'dns'} || {}
75 2 20 $_->{'h'} //= 'from'
78 2 20 $s->{'h_auto'} //= 1
113 0 22 $self->{'sig'} ||= []
202 0 1 $sig->{'s'} // 'UNKNOWN'
0 1 $sig->{'d'} // 'UNKNOWN'
261 22 0 $v = parse_taglist($v, $error) or return
265 22 22 $v->{'v'} //= '1'
268 66 0 $v->{'v'} // ''
269 1 0 $v->{'v'} || ''
279 43 22 $v->{'q'} // 'dns/txt'
287 55 10 $v->{'a'} // 'rsa-sha256'
288 55 10 $v->{'c'} // 'simple/simple'
304 0 0 $v->{'b'} || ''
306 0 0 $v->{'bh'} || ''
322 0 0 $$error ||= '[i]dentity does not match [d]omain'
335 53 12 $bodyc ||= 'simple'
354 18 0 $v = parse_taglist($v, $error) or return
360 17 0 $v->{'v'} ||= 'DKIM1'
0 17 $v->{'k'} //= 'rsa'
375 0 17 $v->{'t'} || ''
376 0 17 $v->{'h'} || 'sha1:sha256'
377 0 17 $v->{'s'} || '*'
400 20 0 $sig->{'h'} || ''
430 178 108 delete $sig{$_} // (next)
435 22 0 delete $sig{$_} // (next)
583 37 0 $sig_prefix{$algo} || die("unsupport digest $algo")
636 149 296 $kv{$k} ||= [$hdr =~ /^($k:[^\n]*\n(?:[ \t][^\n]*\n)*)/mig]
639 167 278 pop @$v // ''
868 0 0 $self->[0]{'d'} // 'unknown'
882 0 0 $sig->{'s'} || 'UNKNOWN'
0 0 $sig->{'d'} || 'UNKNOWN'

or 3 conditions

line l !l&&r !l&&!r condition
233 18 0 0 !ref($txt) || ref $txt eq 'ARRAY'
333 0 0 0 $$error ||= "invalid canonicalization $v->{'c'}"
337 0 0 0 $$error ||= "unsupported algorithm $v->{'a'}"
378 17 0 0 $v->{'s'}{'*'} or $v->{'s'}{'email'}
417 0 0 0 $sig{'t'} || time
425 22 0 0 $sig{'bh:computed'} || $sig{'bh:bin'}
724 41 44 0 $sig->{'bh:collecting'} ||= do { if (not $sig->{'error'} and my $digest = $digest{$sig->{'a:hash'}}() and my $transform = $bodyc{$sig->{'c:body'}}()) { +{'digest', $digest, 'transform', $transform, $sig->{'l'} ? ('l', $sig->{'l'}) : (defined $sig->{'l'} ? ('l', \$sig->{'l'}) : ())}; } else { +{'done', 1}; } }
757 0 1 0 $bh->{'_data_after_l'} ||= substr($tbuf, $bh->{'l'}, -$bh->{'l'}, '') =~ /\S/ & 1
760 0 0 0 $bh->{'_data_after_l'} ||= $tbuf =~ /\S/ & 1