Subject: | Empty file should produce an error message |
While writing test scripts, I found the following. If the string is
completely empty, Encode::Guess->guess returns an undefined value. The
documentation says that it returns an error message.
#!perl -wl
use Encode::Guess qw/utf8 cp932 ascii/;
my $decoder = Encode::Guess->guess ('');
print ref ($decoder);
print $decoder;
You may think that no-one would be stupid enough to do this, but in fact
I was. Would be nice to get an error message like "empty input".