Branch Coverage

lib/Sisimai/Lhost/MXLogic.pm
Criterion Covered Total %
branch 40 56 71.4


line true false branch
24 11 191 if defined $mhead->{'x-mx-bounce'}
25 0 202 if defined $mhead->{'x-mxl-hash'}
26 11 191 if defined $mhead->{'x-mxl-notehash'}
27 11 191 if index($mhead->{'from'}, "Mail Delivery System") == 0
28 40 162 if $mhead->{'subject'} =~ qr/(?: Mail[ ]delivery[ ]failed(:[ ]returning[ ]message[ ]to[ ]sender)? |Warning:[ ]message[ ][^ ]+[ ]delayed[ ]+ |Delivery[ ]Status[ ]Notification ) /x
34 162 40 unless $match
92 1427 85 unless ($readcursor)
94 16 1411 if index($e, $startingof->{'message'}[0]) == 0
97 0 85 unless $readcursor & $indicators->{'deliverystatus'}
98 32 53 unless length $e
110 16 37 if ($e =~ /\A[ \t]*[<]([^ ]+[\@][^ ]+)[>]:(.+)\z/) { }
5 32 elsif (scalar @$dscontents == $recipients) { }
115 0 16 if ($v->{'recipient'})
126 0 5 unless length $e
130 24 16 unless $recipients
132 16 0 if (scalar @{$mhead->{'received'};})
135 5 11 if $mhead->{'received'}[-1] =~ /from[ \t]([^ ]+) /
144 16 0 unless ($e->{'rhost'})
147 0 16 if $e->{'diagnosis'} =~ /host[ \t]+([^ \t]+)[ \t]\[.+\]:[ \t]/
149 16 0 unless ($e->{'rhost'})
150 16 0 if (scalar @{$mhead->{'received'};})
157 16 0 unless ($e->{'command'})
161 32 0 unless $e->{'diagnosis'} =~ /$r/
167 0 16 if ($e->{'command'} eq 'MAIL') { }
0 16 elsif ($e->{'command'} eq 'HELO' or $e->{'command'} eq 'EHLO') { }
179 112 0 unless grep {index($e->{'diagnosis'}, $_) > -1;} @{$$messagesof{$r};}
184 16 0 unless ($e->{'reason'})
186 0 16 if grep {index($e->{'diagnosis'}, $_) > -1;} @$delayedfor