Branch Coverage

blib/lib/Mail/Milter/Authentication/Protocol/Milter.pm
Criterion Covered Total %
branch 66 96 68.7


line true false branch
28 0 707 if $length <= 0 or $length > 131072
36 0 707 unless (defined $data)
40 26 681 if $command eq 'Q'
56 26 655 if ($command eq 'C') { }
26 629 elsif ($command eq 'A') { }
26 603 elsif ($command eq 'B') { }
156 447 elsif ($command eq 'D') { }
26 421 elsif ($command eq 'E') { }
26 395 elsif ($command eq 'H') { }
291 104 elsif ($command eq 'L') { }
26 78 elsif ($command eq 'M') { }
26 52 elsif ($command eq 'N') { }
26 26 elsif ($command eq 'O') { }
26 0 elsif ($command eq 'R') { }
0 0 elsif ($command eq 'T') { }
0 0 elsif ($command eq 'U') { }
68 0 156 unless $buffer =~ s/^(.)//
71 1 155 if (@$data & 1) != 0
80 24 2 if ($returncode == 100)
91 0 291 if (@$header == 1)
107 0 26 unless length $buffer == 12
109 0 26 unless $ver >= 2 and $ver <= 6
136 1 680 if ($reject_reason = $handler->get_reject_mail) { }
0 680 elsif ($defer_reason = $handler->get_defer_mail) { }
8 672 elsif ($quarantine_reason = $handler->get_quarantine_mail) { }
145 0 8 if ($config->{'milter_quarantine'}) { }
154 499 182 if (defined $returncode)
155 475 24 if ($returncode == 100) { }
23 1 elsif ($returncode == 104) { }
1 0 elsif ($returncode == 101) { }
0 0 elsif ($returncode == 102) { }
0 0 elsif ($returncode == 103) { }
172 46 453 if ($config->{'dryrun'})
173 23 23 if ($returncode ne 'c')
179 473 26 if ($command ne 'A')
180 1 472 if ($reject_reason) { }
0 472 elsif ($defer_reason) { }
0 472 elsif ($quarantine_reason) { }
182 0 1 if (not $rcode =~ /^[5]\d\d$/ && $xcode =~ /^[5]\.\d\.\d$/ or substr($rcode, 0, 1) ne substr($xcode, 0, 1)) { }
198 0 0 if (not $rcode =~ /^[4]\d\d$/ && $xcode =~ /^[4]\.\d\.\d$/ or substr($rcode, 0, 1) ne substr($xcode, 0, 1)) { }
232 0 26 unless ($buffer =~ s/^([^\0]*)\0(.)//)
240 0 26 if (substr($addr, 0, 5) eq 'IPv6:')
244 0 26 if (not defined $addr) { }
0 26 elsif (length $addr == 0) { }
258 0 26 if (my $error = $@)
275 0 2019 if not defined $read or $read <= 0
302 0 6 unless defined $value
329 472 86 unless defined $data