Branch Coverage

blib/lib/Mail/Message.pm
Criterion Covered Total %
branch 66 196 33.6


line true false branch
30 0 34 unless ($ENV{'HARNESS_ACTIVE'})
34 0 0 unless $v >= 3
55 115 12 if (defined($head = $args->{'head'})) { }
0 12 elsif (my $msgid = $args->{'messageId'} || $args->{'messageID'}) { }
61 14 113 if (my $body = $args->{'body'})
67 0 127 if defined $args->{'body_type'}
70 0 127 if defined $args->{'head_type'}
73 0 127 if defined $args->{'field_type'}
76 127 0 ref $labels eq 'ARRAY' ? :
77 0 127 if exists $args->{'deleted'}
93 13 0 unless $args{'shallow'} or $args{'shallow_head'}
96 13 0 unless $args{'shallow'} or $args{'shallow_body'}
119 0 44 unless $_[0]{'MM_message_id'}
132 0 5 $cont ? :
148 31 0 if $body
172 0 0 if ref $_[0] and $_[0]->isa("Mail::Transport::Send")
176 0 0 if (not $args{'via'} and defined $default_mailer) { }
198 918 141 unless @_
201 0 141 unless (defined $head)
206 0 141 unless ref $head and $head->isa("Mail::Message::Head")
211 0 141 if (my $old = $self->{'MM_head'})
212 0 0 unless $old->isDelayed
217 141 0 unless $head->isDelayed
231 0 0 unless my $head = (shift())->head
237 0 0 unless my(@from) = (shift())->head->get("From")
269 11 4 defined $subject ? :
278 2 0 unless $head->recvstamp
292 461 87 unless @_
295 87 0 if defined $head
298 0 87 unless (defined $rawbody)
301 0 0 if defined $body
305 0 87 unless ref $rawbody and $rawbody->isa("Mail::Message::Body")
312 47 40 $self->isPart ? :
316 0 87 if defined $oldbody and $body == $oldbody
319 0 87 if defined $oldbody
327 2 0 $body ? :
333 0 0 $body ? :
347 1 0 length $ct ? :
359 0 24 $recurse ? :
24 0 $body->isMultipart ? :
2 24 $body->isNested ? :
363 0 0 $recurse ? :
0 0 $what eq 'ALL' ? :
0 0 $what eq 'DELETED' ? :
26 0 $what eq 'ACTIVE' ? :
0 26 ref $what eq 'CODE' ? :
377 0 0 unless @_
382 0 0 if $head
384 0 0 if $body
392 0 0 if $self->{'MM_modified'}
395 0 0 if ($head and $head->isModified)
401 0 0 if ($body and $body->isModified)
412 266 17 unless @_ > 1
423 0 13 wantarray ? :
433 4 0 unless $old
440 2 0 @_ ? :
453 0 0 $labels->{'old'} ? :
0 0 $labels->{'seen'} ? :
456 0 0 if $newstatus ne $status
462 0 0 $labels->{'replied'} ? :
0 0 $labels->{'flagged'} ? :
464 0 0 if $newxstatus ne $xstatus
475 0 0 if (my $status = $head->get("status"))
483 0 0 if (my $xstatus = $head->get("x-status"))
504 0 13 unless &blessed($message)
507 0 13 if ref $message eq $class
510 13 0 if ($message->isa("Mail::Message"))
516 0 0 if ($message->isa('MIME::Entity')) { }
0 0 elsif ($message->isa('Mail::Internet')) { }
0 0 elsif ($message->isa('Email::Simple')) { }
0 0 elsif ($message->isa('Email::Abstract')) { }
517 0 0 unless ($mime_entity_converter)
519 0 0 if $@
523 0 0 unless $message = $mime_entity_converter->from($message)
528 0 0 unless ($mail_internet_converter)
530 0 0 if $@
534 0 0 unless $message = $mail_internet_converter->from($message)
539 0 0 unless ($email_simple_converter)
541 0 0 if $@
545 0 0 unless $message = $email_simple_converter->from($message)
581 0 12 unless my $body = $self->readBody($parser, $head, $bodytype)
608 0 0 ref $getbodytype ? :
26 0 !$getbodytype ? :
613 0 26 if ($bodytype->isDelayed) { }
622 20 6 defined $ct ? :
625 7 19 if (substr($type, 0, 10) eq 'multipart/' and not $bodytype->isMultipart) { }
2 17 elsif ($type eq 'message/rfc822') { }
630 1 1 if lc $enc eq "none" and not $bodytype->isNested
647 0 26 defined $lines ? :
664 0 0 unless not $body
672 44 111 if ($msgid =~ /\<([^>]*)\>/s)
677 111 44 unless length $msgid
689 0 0 unless defined $size
691 0 0 $size < 10000000 ? :
0 0 $size < 1000000 ? :
0 0 $size < 10000 ? :
0 0 $size < 1000 ? :
0 0 !defined($size) ? :