Branch Coverage

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


line true false branch
19 307 485 unless $mhead->{'subject'} =~ /(?:see transcript for details\z|\AWarning: )/
20 0 485 if $mhead->{'x-aol-ip'}
54 5241 8002 unless ($readcursor)
56 468 4773 if index($e, $startingof->{'message'}[0]) == 0
59 0 8002 unless $readcursor & $indicators->{'deliverystatus'}
60 973 7029 unless length $e
62 4107 2922 if (my $f = 'Sisimai::RFC1894'->match($e)) { }
64 0 4107 unless my $o = "Sisimai::RFC1894"->field($e)
67 524 3583 if ($o->[-1] eq 'addr') { }
449 3134 elsif ($o->[-1] eq 'code') { }
70 479 45 if ($o->[0] eq 'final-recipient') { }
72 11 468 if ($v->{'recipient'})
91 0 3134 unless exists $$fieldtable{$o->[0]}
94 1804 1330 unless $f == 1
105 2911 11 if (substr($e, 0, 1) ne ' ') { }
107 457 2454 if ($e =~ /\A[>]{3}[ ]+([A-Z]{4})[ ]?/) { }
799 1655 elsif ($e =~ /\A[<]{3}[ ]+(.+)\z/) { }
113 774 25 unless grep {$1 eq $_;} @$esmtpreply
117 1042 613 if $sessionerr
118 398 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 468 unless $recipients
167 409 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 409 70 if (scalar @$esmtpreply)
178 263 146 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 474 5 if $e->{'recipient'} =~ /\A[^ ]+[\@][^ ]+\z/
193 5 0 if $e->{'diagnosis'} =~ /[<]([^ ]+[\@][^ ]+)[>]/