[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#990104: Use of uninitialized value in english/international/l10n/scripts/gen-files.pl

On Sun, 20 Jun 2021 19:05:11 +0200
Laura Arjona Reina wrote:

> perl ../../../../english/international/l10n/scripts/gen-files.pl --sort=../../../../english/international/l10n/data/popcon --dist=unstable --l10ndir=../../../../english/international/l10n  --langs --po --podebconf --po4a
> Use of uninitialized value in hash element at ../../../../english/international/l10n/scripts/../../../../Perl/Debian/L10n/Db.pm line 264, <DB> line 26457.
> [...]
> Use of uninitialized value within %LanguageList in concatenation (.) or string at ../../../../english/international/l10n/scripts/gen-files.pl line 331.

what called hash is "named" array in Perl, use 
%name as entire array pairs and 
$name{"name-of-an-element"} as each element

gen-files.pl L331:
  if (defined $status_db{$lang} and (($type eq 'po-debconf') or 
  ($team eq "debian-l10n-$LanguageList{$lang} at lists dot debian dot org"))) {

I think the warning occurs when $LanguageList{$lang} is not defined;
try giving an empty string in that case:
just before L331, add a line:

  $LanguageList{$lang} ||= ""; #define empty string if not defined

I don't test in any way; do not try this on the production machine before local test!

no need to CC me :-)

Reply to: