Branch Coverage

blib/lib/Mail/Message.pm
Criterion Covered Total %
branch 62 194 31.9


line true false branch
30 0 31 unless ($ENV{'HARNESS_ACTIVE'})
34 0 0 unless $v >= 3
55 99 7 if (defined($head = $args->{'head'})) { }
0 7 elsif (my $msgid = $args->{'messageId'} || $args->{'messageID'}) { }
61 11 95 if (my $body = $args->{'body'})
67 0 106 if defined $args->{'body_type'}
70 0 106 if defined $args->{'head_type'}
73 0 106 if defined $args->{'field_type'}
76 106 0 ref $labels eq 'ARRAY' ? :
77 0 106 if exists $args->{'deleted'}
93 10 0 unless $args{'shallow'} or $args{'shallow_head'}
96 10 0 unless $args{'shallow'} or $args{'shallow_body'}
119 0 39 unless $_[0]{'MM_message_id'}
132 0 2 $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 819 111 unless @_
201 0 111 unless (defined $head)
206 0 111 unless ref $head and $head->isa("Mail::Message::Head")
211 0 111 if (my $old = $self->{'MM_head'})
212 0 0 unless $old->isDelayed
217 111 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 428 83 unless @_
295 83 0 if defined $head
298 0 83 unless (defined $rawbody)
301 0 0 if defined $body
305 0 83 unless ref $rawbody and $rawbody->isa("Mail::Message::Body")
312 44 39 $self->isPart ? :
316 0 83 if defined $oldbody and $body == $oldbody
319 0 83 if defined $oldbody
327 2 0 $body ? :
333 0 0 $body ? :
347 0 0 length $ct ? :
359 0 22 $recurse ? :
22 0 $body->isMultipart ? :
0 22 $body->isNested ? :
363 0 0 $recurse ? :
0 0 $what eq 'ALL' ? :
0 0 $what eq 'DELETED' ? :
22 0 $what eq 'ACTIVE' ? :
0 22 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 242 17 unless @_ > 1
423 0 10 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 10 unless &blessed($message)
507 0 10 if ref $message eq $class
510 10 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 7 unless my $body = $self->readBody($parser, $head, $bodytype)
612 0 0 ref $getbodytype ? :
12 0 !$getbodytype ? :
617 0 12 if ($bodytype->isDelayed) { }
626 6 6 defined $ct ? :
629 2 10 if (substr($type, 0, 10) eq 'multipart/' and not $bodytype->isMultipart) { }
1 18 elsif ($type eq 'message/rfc822' and not $bodytype->isNested) { }
647 0 12 defined $lines ? :
664 0 0 unless not $body
672 41 84 if ($msgid =~ /\<([^>]*)\>/s)
677 84 41 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) ? :