Branch Coverage

lib/Sisimai/Lhost/MailRu.pm
Criterion Covered Total %
branch 38 60 63.3


line true false branch
21 351 51 unless lc($mhead->{'from'}) =~ /[<]?mailer-daemon[\@].*mail[.]ru[>]?/
22 0 51 unless $mhead->{'message-id'} =~ /[.](?:mail[.]ru|smailru[.]net)[>]\z/
23 0 51 unless $mhead->{'subject'} =~ qr/(?: Mail[ ]delivery[ ]failed(:[ ]returning[ ]message[ ]to[ ]sender)? |Warning:[ ]message[ ].+[ ]delayed[ ]+ |Delivery[ ]Status[ ]Notification |Mail[ ]failure |Message[ ]frozen |error[(]s[)][ ]in[ ]forwarding[ ]or[ ]filtering ) /x
77 724 367 unless ($readcursor)
79 51 673 if index($e, $startingof->{'message'}[0]) == 0
81 673 418 unless $readcursor & $indicators->{'deliverystatus'}
82 102 316 unless length $e
104 56 260 if ($e =~ /\A[ \t]+([^ \t]+[\@][^ \t]+[.][a-zA-Z]+)\z/) { }
107 153 elsif (scalar @$dscontents == $recipients) { }
106 5 51 if ($v->{'recipient'})
116 0 107 unless length $e
122 153 0 unless $e =~ /\A[ \t]{4}/
127 0 51 unless ($recipients)
129 0 0 if (defined $mhead->{'x-failed-recipients'})
138 0 0 if scalar @$dscontents == $recipients
143 0 51 unless $recipients
145 51 0 if (scalar @{$mhead->{'received'};})
148 51 0 if $mhead->{'received'}[-1] =~ /from[ \t]([^ ]+) /
152 0 0 if (exists $e->{'alterrors'} and $e->{'alterrors'})
155 0 0 if (index($e->{'diagnosis'}, "-") == 0 or substr($e->{'diagnosis'}, -2, 2) eq "__")
157 0 0 if $e->{'alterrors'}
164 56 0 unless ($e->{'rhost'})
167 41 15 if $e->{'diagnosis'} =~ /host[ \t]+([^ \t]+)[ \t]\[.+\]:[ \t]/
169 15 41 unless ($e->{'rhost'})
170 15 0 if (scalar @{$mhead->{'received'};})
179 56 0 unless ($e->{'command'})
183 35 41 unless $e->{'diagnosis'} =~ /$r/
190 5 51 if ($e->{'command'} eq 'MAIL') { }
0 51 elsif ($e->{'command'} eq 'HELO' or $e->{'command'} eq 'EHLO') { }
201 302 15 unless grep {index($e->{'diagnosis'}, $_) > -1;} @{$$messagesof{$r};}