Branch Coverage

lib/Sisimai/RFC5322.pm
Criterion Covered Total %
branch 61 68 89.7


line true false branch
36 1 1 if exists {"addresser" => ["from","return-path","reply-to","errors-to","reverse-path","x-postfix-sender","envelope-from","x-envelope-from"],"date" => ["date","posted-date","posted","resent-date"],"listid" => ["list-id"],"messageid" => ["message-id"],"recipient" => ["to","delivered-to","forward-path","envelope-to","x-envelope-to","resent-to","apparently-to"],"subject" => ["subject"]}->{$group}
51 1 4518 if ref $argv1
52 2 4516 if index($argv1, [" invoked by uid"," invoked from network"]->[0]) > 0 or index($argv1, [" invoked by uid"," invoked from network"]->[1]) > 0
77 0 80068 unless ++$index < $range
78 61321 18747 unless grep {$f eq $_;} @$label
84 14948 3788 unless $f eq "from"
85 5 3783 unless $index + 2 < $range
86 587 3196 unless index($$recvd[$index + 2], "(") == 0
106 0 3196 unless $index + 3 < $range
113 983 5409 if length $e < 4 or $e eq "unknown"
114 501 4547 if $e eq "localhost" or $e eq "[127.0.0.1]" or $e eq "[IPv6:::1]"
115 578 3969 if index($e, ".") == -1 or index($e, "=") > 1
121 874 8158 unless defined $token->{$e}
122 0 8158 unless length $token->{$e}
123 7923 235 unless index($token->{$e}, "[") == 0
130 387 4129 if $token->{'from'} eq "localhost" or $token->{'from'} eq "localhost.localdomain"
131 1181 2948 if index($token->{'from'}, ".") == -1
132 415 2533 if scalar @{"Sisimai::RFC791"->find($token->{'from'})}
140 2533 1983 if $right
141 1399 584 if scalar @$alter == 0
142 226 358 if index($alter->[0], $token->{'from'}) != -1
144 25 333 if (index($token->{'from'}, 'localhost') == 0) { }
80 253 elsif (index($token->{'from'}, '.') == -1) { }
150 80 0 if index($alter->[0], ".") > 0
159 146 4370 unless defined $token->{'by'}
160 0 4516 unless defined $token->{'from'}
161 2941 1575 if exists $token->{'for'}
164 0 19394 if index($token->{$e}, " ") != -1
198 2928 3454 if $positionor == -1
203 3409 1057 if ($positionor > 0) { }
214 3409 1057 if (length $latterpart > 0)
221 3390 19 if ($keeps == 0)
223 3390 0 if index $latterpart, "\n\n"
225 27 3382 unless substr($latterpart, -1, 1) eq "\n"