Branch Coverage

blib/lib/Email/MIME/Encode.pm
Criterion Covered Total %
branch 29 40 72.5


line true false branch
24 2 42 if (&Scalar::Util::blessed($val) and $val->can("as_mime_string"))
32 22 20 if exists $Email::MIME::Header::header_to_class_map{$header}
36 9 11 unless _needs_mime_encode($val) or $val =~ /[^\s]{$min_wrap_length,}/u
40 0 11 if exists $no_mime_headers{$header}
62 0 22 unless eval { do { &Module::Runtime::require_module($class) } }
65 0 22 unless $class->can("from_string")
67 2 20 ref $val eq 'ARRAY' ? :
69 0 22 unless $object->can("as_mime_string")
103 120 712 $first_processed ? :
8 824 if (length($chunk) + length($chr) > ($first_processed ? $real_length : $first_length))
104 8 0 if (length $chunk > 0)
108 8 0 unless $first_processed
115 36 0 if length $chunk
127 21 16 if exists $Email::MIME::Header::header_to_class_map{$header}
130 1 15 if exists $no_mime_headers{$header}
132 1 14 unless $val =~ /=\?/u
145 0 21 unless eval { do { &Module::Runtime::require_module($class) } }
148 0 21 unless $class->can("from_mime_string")
152 0 21 unless $object->can("as_string")
159 0 64 unless defined $text