Branch Coverage

lib/Sisimai/RFC3464.pm
Criterion Covered Total %
branch 101 110 91.8


line true false branch
18 19 856 unless keys %$mhead
19 1 855 unless ref $mbody eq "SCALAR"
39 124 731 unless (grep {index($$mbody, $_) > 0;} @$boundaries)
43 17 107 if $p0 > 0
66 60 13 if $p0 < 0
70 15 13 if $p0 < 0
79 169 686 if (index($emailparts->[0], $startingof->{'message'}[0]) == -1)
85 53 116 if $p0 > 0
92 1684 26 if $p0 < 0
101 11169 6847 if ($readcursor == 0)
103 739 10430 if index($e, $startingof->{'message'}[0]) == 0
108 3800 7369 if $e eq "" or $goestonext
112 988 6381 if (grep {index($e, $_) == 0;} @$isboundary)
113 825 5556 if (index($e, "Content-Type:") == 0)
115 0 825 if (index($e, 'multipart/') > 0) { }
825 0 elsif (index $e, 'text/plain') { }
131 25 5531 if index($e, "Content-") == 0
132 180 5351 if index($e, "This is a MIME") == 0
133 88 5263 if index($e, "This is a multi") == 0
134 120 5143 if index($e, "This is an auto") == 0
135 5 5138 if index($e, "This multi-part") == 0
136 10 5128 if index($e, "###") == 0
137 0 5128 if index($e, "***") == 0
138 33 5095 if index($e, "--") == 0
139 65 5030 if index($e, "--- The follow") != -1
140 23 5007 if index($e, "--- Transcript") != -1
145 879 5968 if ($readcursor & $indicators->{'deliverystatus'}) == 0 or $e eq ""
147 5247 721 if (my $f = 'Sisimai::RFC1894'->match($e)) { }
149 165 5082 unless my $o = "Sisimai::RFC1894"->field($e)
152 957 4125 if ($o->[3] eq 'addr') { }
670 3455 elsif ($o->[3] eq 'code') { }
155 745 212 if ($o->[0] eq 'final-recipient') { }
158 0 745 unless "Sisimai::Address"->is_emailaddress($cv)
159 0 745 if $cw > 0 and $cv eq $$dscontents[$cw - 1]{'recipient'}
161 32 713 if ($v->{'recipient'})
180 659 2796 if ($o->[4] ne "")
186 0 3455 unless exists $$fieldtable{$o->[0]}
187 240 3215 if $o->[3] eq "host" and "Sisimai::RFC1123"->is_internethost($o->[2]) == 0
190 1923 1292 unless $f == 1
195 238 483 if (index($e, 'X-') == 0 and index($e, ': ') > 1) { }
197 206 32 unless "Sisimai::RFC3464::ThirdParty"->is3rdparty($e)
200 16 16 if (scalar @$cv > 0 and not exists $$fieldtable{lc $cv->[0]}) { }
202 16 0 if index($cv->[4], "reason:") == 0
206 0 16 unless $z
211 274 209 if (index($p, "Diagnostic-Code:") == -1)
213 20 254 if index($e, "Content-") == 0
214 47 207 if index($e, "--") == 0
220 33 176 unless index($e, " ") == 0
231 116 26 unless length $dscontents->[0]{'alias'} > 0
232 0 26 unless "Sisimai::Address"->is_emailaddress($dscontents->[0]{'alias'})
236 116 739 unless $recipients
242 729 10 if ($beforemesg ne "")
257 712 59 if ($recipients == 1)
260 115 597 if (index($issuedcode, $lowercased) != -1) { }
276 23 716 unless $emailparts->[1]