Branch Coverage

blib/lib/Mail/Milter/Authentication/Handler/XGoogleDKIM.pm
Criterion Covered Total %
branch 32 58 55.1


line true false branch
43 0 797 if $self->{'failmode'}
48 40 757 if (lc $header eq "dkim-signature")
51 0 797 if (lc $header eq "domainkey-signature")
58 38 759 if ($header eq "X-Google-DKIM-Signature")
66 38 0 if (defined $selector and defined $domain)
77 0 64 if $self->{'failmode'}
80 26 38 if ($self->{'has_dkim'} == 0) { }
83 18 8 unless ($config->{'hide_none'})
99 0 38 if (my $error = $@)
115 0 38 if (my $error = $@)
131 0 62 if $self->{'failmode'}
132 24 38 if $self->{'has_dkim'} == 0
136 0 38 if ($self->{'carry'} ne '') { }
144 0 38 if (substr($dkim_chunk, -1) eq "\r")
155 0 38 if (my $error = $@)
167 26 38 if $self->{'has_dkim'} == 0
168 0 38 if $self->{'failmode'}
185 0 38 unless ($dkim->signatures)
186 0 0 unless ($config->{'hide_none'} and $dkim_result eq "none")
195 38 0 $otype eq 'Mail::DKIM::Signature' ? :
0 38 $otype eq 'Mail::DKIM::DkSignature' ? :
206 0 38 if ($signature_result eq "invalid")
207 0 0 if ($signature_result_detail =~ /DNS query timeout for (.*) at /u)
215 8 30 if ($signature_result ne "pass" and $signature_result ne "none")
217 8 0 if ($1)
221 38 0 unless ($config->{'hide_none'} and $signature_result eq "none")
244 0 38 if (my $error = $@)
267 0 0 if ($error =~ /^DNS error: query timed out/u or $error =~ /^DNS query timeout/u) { }
0 0 elsif ($error =~ /^no domain to fetch policy for$/u or $error =~ /^policy syntax error$/u or $error =~ /^empty domain label/u or $error =~ /^invalid name /u) { }