Branch Coverage

lib/Sisimai/Lhost/Sendmail.pm
Criterion Covered Total %
branch 62 72 86.1


line true false branch
19 307 491 unless $mhead->{'subject'} =~ /(?:see transcript for details\z|\AWarning: )/
20 0 491 if $mhead->{'x-aol-ip'}
54 5301 8098 unless ($readcursor)
56 474 4827 if index($e, $startingof->{'message'}[0]) == 0
59 0 8098 unless $readcursor & $indicators->{'deliverystatus'}
60 985 7113 unless length $e
62 4161 2952 if (my $f = 'Sisimai::RFC1894'->match($e)) { }
64 0 4161 unless my $o = "Sisimai::RFC1894"->field($e)
67 530 3631 if ($o->[-1] eq 'addr') { }
455 3176 elsif ($o->[-1] eq 'code') { }
70 485 45 if ($o->[0] eq 'final-recipient') { }
72 11 474 if ($v->{'recipient'})
91 0 3176 unless exists $$fieldtable{$o->[0]}
94 1828 1348 unless $f == 1
105 2941 11 if (substr($e, 0, 1) ne ' ') { }
107 463 2478 if ($e =~ /\A[>]{3}[ ]+([A-Z]{4})[ ]?/) { }
805 1673 elsif ($e =~ /\A[<]{3}[ ]+(.+)\z/) { }
113 780 25 unless grep {$1 eq $_;} @$esmtpreply
117 1054 619 if $sessionerr
118 404 215 if (index($e, $startingof->{'error'}[0]) == 0)
125 10 205 if ($e =~ /\A[<](.+)[>][.]+ (.+)\z/) { }
134 46 159 if ($e =~ /\A[45]\d\d[ \t]([45][.]\d[.]\d)[ \t].+/) { }
5 154 elsif (index($e, 'Message: ') == 0 or index($e, 'Warning: ') == 0) { }
151 5 6 unless index($p, "Diagnostic-Code:") == 0
152 0 6 unless $e =~ /\A[ \t]+(.+)\z/
160 17 474 unless $recipients
167 415 70 if scalar @$esmtpreply
169 56 0 if (exists $anotherset->{'diagnosis'} and $anotherset->{'diagnosis'})
171 0 56 if $e->{'diagnosis'} =~ /\A[ \t]+\z/
173 15 41 if $e->{'diagnosis'} =~ /\A\d+\z/
175 415 70 if (scalar @$esmtpreply)
178 263 152 if length $r > length $e->{'diagnosis'}
182 46 0 if (exists $anotherset->{'status'} and $anotherset->{'status'})
184 0 46 unless ($e->{'status'} and $e->{'status'} =~ /\A[45][.]\d[.]\d{1,3}\z/)
192 480 5 if $e->{'recipient'} =~ /\A[^ ]+[\@][^ ]+\z/
193 5 0 if $e->{'diagnosis'} =~ /[<]([^ ]+[\@][^ ]+)[>]/