Branch Coverage

blib/lib/Mail/Milter/Authentication/Protocol/Milter.pm
Criterion Covered Total %
branch 71 106 66.9


line true false branch
27 0 923 if $length <= 0 or $length > 131072
35 0 923 unless (defined $data)
39 33 890 if $command eq "Q"
53 33 857 if ($command eq 'C') { }
33 824 elsif ($command eq 'A') { }
31 793 elsif ($command eq 'B') { }
196 597 elsif ($command eq 'D') { }
33 564 elsif ($command eq 'E') { }
33 531 elsif ($command eq 'H') { }
399 132 elsif ($command eq 'L') { }
33 99 elsif ($command eq 'M') { }
33 66 elsif ($command eq 'N') { }
33 33 elsif ($command eq 'O') { }
33 0 elsif ($command eq 'R') { }
0 0 elsif ($command eq 'T') { }
0 0 elsif ($command eq 'U') { }
65 0 196 unless $buffer =~ s/^(.)//u
68 1 195 if (@$data & 1) != 0
77 31 2 if ($returncode == 100)
88 0 399 if (@$header == 1)
89 0 399 $self->{'headers_include_space'} ? :
104 0 33 unless length $buffer == 12
106 0 33 unless $ver >= 2 and $ver <= 6
134 1 889 if ($reject_reason = $handler->get_reject_mail) { }
0 889 elsif ($defer_reason = $handler->get_defer_mail) { }
8 881 elsif ($quarantine_reason = $handler->get_quarantine_mail) { }
143 0 8 if ($config->{'milter_quarantine'}) { }
152 661 229 if (defined $returncode)
153 0 661 if ($returncode eq 'q') { }
637 24 elsif ($returncode == 100) { }
23 1 elsif ($returncode == 104) { }
1 0 elsif ($returncode == 101) { }
0 0 elsif ($returncode == 102) { }
0 0 elsif ($returncode == 103) { }
173 46 615 if ($config->{'dryrun'})
174 23 23 if ($returncode ne "c")
180 628 33 if ($command ne "A")
181 1 627 if ($reject_reason) { }
0 627 elsif ($defer_reason) { }
0 627 elsif ($quarantine_reason) { }
183 0 1 if (not $rcode =~ /^[5]\d\d$/u && $xcode =~ /^[5]\.\d\.\d$/u or substr($rcode, 0, 1) ne substr($xcode, 0, 1)) { }
199 0 0 if (not $rcode =~ /^[4]\d\d$/u && $xcode =~ /^[4]\.\d\.\d$/u or substr($rcode, 0, 1) ne substr($xcode, 0, 1)) { }
231 0 33 unless ($buffer =~ s/^([^\0]*)\0(.)//u)
239 0 33 if (substr($addr, 0, 5) eq "IPv6:")
243 0 33 if (not defined $addr) { }
0 33 elsif (length $addr == 0) { }
257 0 33 if (my $error = $@)
274 0 2637 if not defined $read or $read <= 0
294 0 9 $self->{'headers_include_space'} ? :
302 0 13 unless defined $value
308 0 13 $self->{'headers_include_space'} ? :
321 0 60 $self->{'headers_include_space'} ? :
331 627 116 unless defined $data