Branch Coverage

blib/lib/MIME/Lite/Generator.pm
Criterion Covered Total %
branch 66 82 80.4


line true false branch
16 36 10 if (defined $$msg{'Path'} or defined $$msg{'FH'} or defined $$msg{'Data'}) { }
17 4 32 if ($encoding eq 'BINARY') { }
19 13 elsif ($encoding eq '8BIT') { }
4 9 elsif ($encoding eq '7BIT') { }
4 5 elsif ($encoding eq 'QUOTED-PRINTABLE') { }
5 0 elsif ($encoding eq 'BASE64') { }
18 2 2 defined $$msg{'Data'} ? :
23 17 2 defined $$msg{'Data'} ? :
28 2 2 defined $$msg{'Data'} ? :
33 2 2 defined $$msg{'Data'} ? :
38 3 2 defined $$msg{'Data'} ? :
50 25 21 ref $class ? :
68 710 25 if $str_ref
72 25 0 if ($$self{'boundary'})
73 15 10 if (@{$$self{'generators'};})
83 45 740 if ($$self{'state'} eq 'init')
93 10 35 if ($type =~ m[^multipart/]i) { }
0 35 elsif ($type =~ m[^message/]) { }
97 0 10 defined $$self{'msg'}{'Preamble'} ? :
114 0 0 if (@parts == 0) { }
0 0 elsif (@parts == 1) { }
134 705 35 $$self{'has_chunk'} ? :
140 35 705 if ($$self{'state'} eq 'first')
143 10 25 unless (defined $$self{'msg'}{'Data'})
144 10 0 if (defined $$self{'msg'}{'Path'}) { }
146 0 10 unless $$self{'fh'}->open($$self{'msg'}{'Path'})
152 0 10 if $$self{'msg'}->binmode
167 2 2 if ($$self{'msg'}{'Data'} =~ /^(.*[\r\n]*)/gms)
180 2 21 if ($$self{'encoding'} eq 'BINARY')
181 0 2 if $$self{'is_smtp'}
185 17 4 if ($$self{'encoding'} eq '8BIT')
189 2 2 if ($$self{'encoding'} eq '7BIT')
193 2 0 if ($$self{'encoding'} eq 'BASE64')
202 4 2 if (read $$self{'fh'}, $_, 2048) { }
209 2 0 if (length $$self{'last'})
210 0 2 if $$self{'is_smtp'}
215 6 0 defined $rv ? :
221 182 2 if (defined($_ = readline $$self{'fh'}))
233 182 2 if (defined($_ = readline $$self{'fh'}))
245 182 2 if (defined($_ = readline $$self{'fh'}))
257 118 2 if (read $$self{'fh'}, $_, 45)