Branch Coverage

lib/Sisimai/Lhost/Courier.pm
Criterion Covered Total %
branch 37 44 84.0


line true false branch
20 0 207 if index($mhead->{'from'}, "Courier mail server at ") > -1
21 21 186 if $mhead->{'subject'} =~ /(?:NOTICE: mail delivery status[.]|WARNING: delayed mail[.])/
22 187 20 if (defined $mhead->{'message-id'})
24 21 166 if $mhead->{'message-id'} =~ /\A[<]courier[.][0-9A-F]+[.]/
26 186 21 unless $match
60 252 536 unless ($readcursor)
62 21 231 if (rindex($e, $startingof->{'message'}[0]) > -1 or rindex($e, $startingof->{'message'}[1]) > -1)
68 231 536 unless $readcursor & $indicators->{'deliverystatus'}
69 147 389 unless length $e
71 163 226 if (my $f = 'Sisimai::RFC1894'->match($e)) { }
73 0 163 unless my $o = "Sisimai::RFC1894"->field($e)
76 21 142 if ($o->[-1] eq 'addr') { }
21 121 elsif ($o->[-1] eq 'code') { }
79 21 0 if ($o->[0] eq 'final-recipient') { }
81 0 21 if ($v->{'recipient'})
100 0 121 unless exists $$fieldtable{$o->[0]}
103 58 63 unless $f == 1
127 16 210 if ($e =~ /\A[>]{3}[ ]+([A-Z]{4})[ ]?/) { }
133 205 5 unless index($p, "Diagnostic-Code:") == 0
134 0 5 unless $e =~ /\A[ \t]+(.+)\z/
142 0 21 unless $recipients
151 57 5 unless grep {index($e->{'diagnosis'}, $_) > -1;} @{$$messagesof{$r};}