Branch Coverage

blib/lib/Mail/Message/Body/Multipart.pm
Criterion Covered Total %
branch 88 118 74.5


line true false branch
34 23 24 defined $based ? :
39 31 18 if ($args->{'parts'})
41 0 54 unless defined $raw
44 0 54 unless defined $cooked
52 0 49 if defined $preamble and not builtin::blessed($preamble)
56 0 49 if defined $epilogue and not builtin::blessed($epilogue)
59 23 26 if ($based) { }
65 1 2 !$args->{'parts'} && $based->isMultipart ? :
20 3 @parts ? :
88 2 1 $preamble ? :
2 1 $epilogue ? :
101 2 20 if (my $preamble = $self->preamble)
103 2 0 if $preamble->endsOnNewline
108 31 2 if $part->body->endsOnNewline
111 2 20 if (my $epilogue = $self->epilogue)
126 5 21 if (my $preamble = $self->preamble) { }
131 6 20 if (my $epilogue = $self->epilogue)
145 0 4 if $preamble
149 4 4 if (not @lines) { }
4 0 elsif ($lines[-1] =~ /\n$/) { }
155 0 4 if (not @lines) { }
4 0 elsif ($lines[-1] =~ /\n$/) { }
160 0 4 if (my $epilogue = $self->epilogue)
165 4 0 wantarray ? :
182 3 6 if (my $preamble = $self->preamble)
188 11 4 if $count++
192 7 2 if $count++
195 3 6 if (my $epilogue = $self->epilogue)
205 3 2 unless my $epilogue = $self->epilogue
237 3 13 if ($head->get('Content-Transfer-Encoding') || '') =~ /(\w+)/
246 10 6 unless $preamble->nrLines
247 6 10 if defined $preamble
253 16 28 if ($sep =~ /^--\Q$boundary\E--[ \t]*\n?/)
263 0 28 unless $part->readFromParser($parser, $bodytype)
266 28 0 if $part->head->names or $part->body->size
276 0 0 defined $preamble ? :
0 0 @parts ? :
16 0 defined $epilogue ? :
284 1 15 unless $has_epilogue or $epilogue->nrLines
287 15 1 if defined $epilogue
300 2 18 if (my $preamble = $self->preamble)
302 0 2 unless $preamble == $new_preamble
306 2 18 if (my $epilogue = $self->epilogue)
308 1 1 unless $epilogue == $new_epilogue
316 13 19 if $new_body != $part_body
320 11 9 unless $changes
356 0 1 @allparts == @parts ? :
369 68 93 unless @_
374 0 0 ref $what eq 'CODE' ? :
93 0 $what eq 'ACTIVE' ? :
0 93 $what eq 'DELETED' ? :
0 93 $what eq 'ALL' ? :
0 93 if ($what eq 'RECURSE') { }
387 0 8 unless my $msg = $self->message
389 2 6 $msg->isa('Mail::Message::Part') ? :
393 8 7 if $parts[$partnr] == $part
404 80 50 unless (@_)
406 80 0 if defined $boundary
413 0 0 $msg ? :