Subject: | Spurious undef warning on Locale::Country::rename_country |
In Locale::Country 3.16, using this code from the synopsis:
Locale::Country::rename_country('gb' => 'Great Britain')
results in an undef warning:
$ perl -MLocale::Country -e "Locale::Country::rename_country('gb' =>
'Great Britain')"
Use of uninitialized value within @args in string eq at
/Users/sartak/.perl/perls/perl-5.12.3/lib/5.12.3/Locale/Country.pm line 166.
The problem seems to be:
$nowarn = 1, pop(@args) if ($args[$#args] eq "nowarn");
maybe this should read:
$nowarn = 1, pop(@args) if ($#args >= 0 && $args[$#args] eq "nowarn");
Thanks.