Branch Coverage

blib/lib/Mail/Message/Body/Encode.pm
Criterion Covered Total %
branch 61 100 61.0


line true false branch
39 0 61 unless ref $type_to
43 58 3 unless ref $transfer
50 58 3 if ($type_from =~ m[^text/]i)
54 57 1 if (my $charset = delete $args{'charset'}) { }
0 1 elsif (not $char_to) { }
55 39 18 if (not $char_to or $char_to ne $charset)
65 10 48 if ($char_was ne 'PERL')
66 0 10 unless $from = &find_encoding($char_was)
69 31 27 if ($char_to ne 'PERL')
70 0 31 unless $to = &find_encoding($char_to)
74 0 58 if ($trans_to ne 'none' and $char_to eq 'PERL')
85 23 38 if ($trans_was eq $trans_to)
86 17 2 unless $from or $to
87 0 4 if ($from and $to and $from->name eq $to->name)
89 0 0 if $char_was ne $char_to
97 36 8 if ($trans_was eq 'none') { }
8 0 elsif (my $decoder = $self->getTransferEncHandler($trans_was)) { }
107 0 5 $to && $from && $from->name ne $to->name ? :
9 5 $from && $char_to eq 'PERL' ? :
30 14 $to && $char_was eq 'PERL' ? :
114 39 5 $new_data ? :
118 34 10 if ($trans_to ne 'none')
119 0 34 unless $trans = $self->getTransferEncHandler($trans_to)
124 34 10 defined $trans ? :
136 19 0 if $self->checked
140 0 0 if $encoding eq 'none'
145 0 0 $encoder ? :
166 30 0 defined $mime ? :
30 21 if $enc eq 'none'
171 28 19 !$charset || $charset eq 'PERL' ? :
4 47 !($mime && $mime =~ m[^text/]i) ? :
176 19 32 $enc_was ne 'none' && $charset eq $new_charset ? :
186 0 0 if $self == $body
199 0 0 unless $newmime eq $mime
200 0 0 unless $transfer eq $encoded->transferEncoding
210 0 11 unless my $type = $self->type
211 0 11 unless my $mime = $mime_types->type($type->body)
224 1 0 if ($field = $self->disposition)
225 1 0 if $field->can('study')
231 1 0 if (not defined $raw and $field = $self->type)
232 1 0 if $field->can('study')
239 1 0 if (not defined $raw && length $raw) { }
0 0 elsif (index($raw, '?') >= 0) { }
248 0 1 unless @_
253 0 1 if (defined $base)
261 0 1 length $filename && $filename =~ /(.*)\.([^.]+)/ ? :
290 31 11 if exists $transfer_encoders{$type}
293 0 11 unless $class
296 0 11 if $@
306 0 0 if (ref $what) { }