Branch Coverage

blib/lib/Mail/Message/Construct/Rebuild.pm
Criterion Covered Total %
branch 47 70 67.1


line true false branch
36 6 8 $args{'rules'} ? :
37 0 14 if $args{'extra_rules'}
38 6 8 if $args{'extraRules'}
41 0 65 if ref $rule
42 0 65 unless ($self->can($rule))
50 0 14 unless my $rebuild = $self->recursiveRebuildPart($self, %args, "rules", \@rules)
55 4 10 if ($rebuild->isa("Mail::Message::Part"))
63 14 0 unless $keep
72 1 3 $part->isNested ? :
77 25 10 unless $part->isMultipart
79 3 7 @active == 1 ? :
84 0 14 $part->isMultipart && $part->body->parts == 0 ? :
90 23 2 unless $part->isMultipart and $part->parts("ACTIVE") == 0
113 0 0 $part->body->lines == 0 ? :
118 26 19 unless $part->isMultipart
126 9 19 if (not defined $new) { }
19 0 elsif ($new == $part) { }
131 12 7 unless $changed
149 25 7 unless $part->isNested
155 0 7 unless defined $newnested
156 4 3 if $newnested == $srcnested
169 7 23 $part->isDeleted ? :
175 23 0 unless $part->isNested and $part->body->nested->isDeleted or $part->isDeleted
193 6 2 unless $part->body->mimeType eq "text/html"
198 0 2 unless defined $container and $container->mimeType eq "multipart/alternative"
204 2 2 if $subpart->body->mimeType eq "text/plain"
214 0 0 unless $container and $container->mimeType eq "multipart/alternative"
219 0 0 $last && $part == $last ? :
227 2 0 unless (defined $has_hft)
232 2 0 unless $has_hft and $part->body->mimeType eq "text/html"
241 0 0 if $in_alt and &first(sub { $_->body->mimeType eq "text/plain"; } , $container->parts)
252 0 0 if $in_alt
283 218 0 unless $args{$rule}
284 9 209 unless my $rebuild = $self->$rule($part, %params)
287 16 193 if ($part != $rebuild)