Branch Coverage

lib/Sisimai/Message.pm
Criterion Covered Total %
branch 100 108 92.5


line true false branch
50 1 3536 unless $aftersplit = __PACKAGE__->part(\$email)
57 3518 18 if ($thing->{'header'}{'subject'})
60 153 3365 'Sisimai::RFC2045'->is_encoded(\$cv) ? :
62 3508 10 if $p1 < 0
65 30 3488 if ($p1 > -1)
76 3478 58 if $beforefact = __PACKAGE__->sift(%$param)
77 40 18 unless grep {index($aftersplit->[2], $_) != -1;} @$Boundaries
86 0 18 unless length $email > 128
88 41 3478 unless $beforefact
93 0 3478 ref $r ? :
108 768 2769 if rindex($$email, "\r\n") != -1
111 1 3536 if $parts->[1] eq "" or $parts->[2] eq ""
113 461 3075 if (substr($parts->[1], 0, 5) eq 'From ') { }
122 3536 0 unless substr($parts->[1], -1, 1) eq "\n"
126 3536 7072 $e eq 'text/html' ? :
129 10385 837 if $p0 < 0
130 223 614 if $p1 < 0
156 6216 798 if (index($$argv0, "\nReceived:") > 0 or index($$argv0, "Received:") == 0)
162 255 11488 if index($e, "Sisimai::RFC5322"->woReceived->[0]) > 0 or index($e, "Sisimai::RFC5322"->woReceived->[1]) > 0
171 3536 3478 unless $argv1
172 306 3172 unless length $headermaps->{'subject'}
175 44 3128 if ('Sisimai::String'->is_8bit(\$headermaps->{'subject'})) { }
182 0 44 if $@
187 251 2877 if ('Sisimai::RFC2045'->is_encoded(\$headermaps->{'subject'})) { }
191 308 5 if "Sisimai::RFC2045"->is_encoded(\$v)
217 1023 195448 if substr($cf, -1, 1) eq " "
222 134031 62440 if ($fn eq "")
232 35179 27261 unless grep {$fn eq $_;} @$Fields1894, "Content-Type"
234 14793 12468 if ($p1 > 0) { }
249 2324 26717 if index($f, " ") > 0
251 4764 21953 if ($p2 > 0)
256 26187 530 if $ps ne "boundary"
257 10 26707 if $f eq "rfc/822"
263 2026 12767 if ($fn eq "Diagnostic-Code")
267 5 2021 if scalar @$ab == 1 and index($lines[$index + 1], " ") == 0
275 3017 9451 if index($fn, "-Date") > 0 or index($fn, "-Message-ID") > 0
282 10282 52158 if ($fn eq "Content-Type")
287 71968 6 if $p1 < 0
295 162452 0 if length $f > 0
302 3557 0 if substr($email, -2, 2) ne "\n\n"
339 458 3078 if (index($mesgformat, 'text/plain') == 0 or index($mesgformat, 'text/html') == 0) { }
2410 668 elsif (index($mesgformat, 'multipart/') == 0) { }
341 11 447 if ($ctencoding eq 'base64') { }
60 387 elsif ($ctencoding eq 'quoted-printable') { }
351 0 458 if index($mesgformat, "text/html") != -1
356 2393 17 if defined $p and length $$p
361 713 2823 if (ref $hookmethod eq "CODE")
365 0 713 if $@
379 3370 36205 if exists $haveloaded->{$r}
384 2683 33522 if $havesifted
390 739 114 if ($havesifted)
395 40 74 if ($havesifted)
400 16 58 if ($havesifted)
405 58 3478 unless $havesifted