Branch Coverage

lib/Sisimai/Lhost/Postfix.pm
Criterion Covered Total %
branch 68 74 91.8


line true false branch
19 179 491 unless $mhead->{'subject'} eq "Undelivered Mail Returned to Sender"
20 10 481 if $mhead->{'x-aol-ip'}
65 2683 12473 unless ($readcursor)
67 432 2251 if $e =~ /$markingsof->{'message'}/
70 0 12473 unless $readcursor & $indicators->{'deliverystatus'}
71 3133 9340 unless length $e
73 3292 6048 if (my $f = 'Sisimai::RFC1894'->match($e)) { }
75 0 3292 unless my $o = "Sisimai::RFC1894"->field($e)
78 796 2496 if ($o->[-1] eq 'addr') { }
432 2064 elsif ($o->[-1] eq 'code') { }
81 432 364 if ($o->[0] eq 'final-recipient') { }
83 15 417 if ($v->{'recipient'})
98 55 377 if $v->{'spec'} eq "X-POSTFIX"
103 0 2064 unless exists $$fieldtable{$o->[0]}
106 1220 844 unless $f == 1
117 522 5526 if (index($p, 'Diagnostic-Code:') == 0 and $e =~ /\A[ \t]+(.+)\z/) { }
417 5109 elsif ($e =~ /\A(X-Postfix-Sender):[ ]*rfc822;[ ]*(.+)\z/) { }
128 337 4772 if ($e =~ /[ \t][(]in reply to (?:end of )?([A-Z]{4}).*/ or $e =~ /([A-Z]{4})[ \t]*.*command[)]\z/) { }
6 4766 elsif ($e =~ /\A[<]([^ ]+[\@][^ ]+)[>] [(]expanded from [<](.+)[>][)]:[ \t]*(.+)\z/) { }
421 4345 elsif ($e =~ /\A[<]([^ ]+[\@][^ ]+)[>]:(.*)\z/) { }
5 4340 elsif (index($e, '--- Delivery report unavailable ---') > -1) { }
132 332 5 if $anotherset->{'diagnosis'}
159 2859 1481 unless $anotherset->{'diagnosis'}
160 642 839 if $e =~ /\A[ \t]{4}(.+)\z/
169 64 417 unless ($recipients)
171 10 54 if (defined $anotherset->{'recipient'} and $anotherset->{'recipient'}) { }
179 5 49 if ($nomessages and $emailsteak->[1] =~ /^To:[ ]*(.+)/m)
187 49 432 unless $recipients
194 427 0 if (exists $anotherset->{'diagnosis'} and $anotherset->{'diagnosis'})
197 0 427 if ($e->{'diagnosis'} =~ /\A\d+\z/) { }
206 172 255 if ($e->{'status'} eq "" or substr($e->{'status'}, -4, 4) eq ".0.0")
209 10 162 if (length $as > 0 and substr($as, -4, 4) ne ".0.0")
215 427 0 if ($e->{'replycode'} eq "" or substr($e->{'replycode'}, -2, 2) eq "00")
218 371 56 if (length $ar > 0 and substr($ar, -2, 2) ne "00")
224 366 61 if ($as or $ar and length $anotherset->{'diagnosis'} > length $e->{'diagnosis'})
232 44 403 if $e->{'diagnosis'} =~ /refused to talk to me:/
233 337 110 if $e->{'diagnosis'} =~ /host .+ said:/