Subject: | wrong zero value encoding |
Date: | Fri, 26 Sep 2014 18:21:55 +0200 (CEST) |
To: | bug-MIME-EncWords [...] rt.cpan.org |
From: | Alexandre DERUMIER <aderumier [...] odiso.com> |
Hi,
encode_mimewords("0");
result to
Can't use an undefined value as an ARRAY reference
or
encode_mimewords("0 a");
result to "a"
So, 0 is skipped.
This is because of
sub _split_ascii {
....
next unless scalar(@splitwords) or $word; # skip first garbage
....
}
it should be
next unless scalar(@splitwords) or defined($word); # skip first garbage
Regards,
Alexandre Derumier