Strange Lookup Issues
I've been seeing some odd behavior of this module (0.03) but it's inconsistent so I can't rule out my local environment.
Sample Code:
use strict;
use warnings;
use ISO::639_1;
my $language = "English";
my $lang = get_iso639_1($language);
print "Language: $language\n";
if ($lang) {
print $lang->{name}."\n";
print $lang->{'639-1'}."\n";
print $lang->{'639-2'}."\n";
} else {
print "No language found\n";
}
Output:
Language: English
No language found
If I change $language to "en
":
Language: en
English
en
eng
(To me, this module would be very useful it you could give it the full name, a 639-1 code or a 639-2 code and get whatever you wanted back out.)