[Bug 321688] [NEW] Broken argument parsing in Lexicon::import().
Remo Inverardi
launchpad+nospam at inverardi.ch
Mon Jan 26 23:20:09 UTC 2009
Public bug reported:
The Locale::Maketext::Lexicon::import() function of the liblocale-
maketext-lexicon-perl fails to parse its arguments correctly. As a
result, the following function call does not work:
> Locale::Maketext::Lexicon->import(Gettext => '/tmp/sample.po');
While trying to check if the number of arguments is *even*, the import()
function actually checks if an *odd* number of arguments was passed.
>From /usr/share/perl5/Locale/Maketext/Lexicon.pm +213:
> sub import {
> my $class = shift;
> return unless @_;
>
> my %entries;
> if (UNIVERSAL::isa($_[0], 'HASH')) {
> # a hashref with $lang as keys, [$format, $src ...] as values
> %entries = %{$_[0]};
> }
> elsif (@_ % 2) {
> %entries = ( '' => [ @_ ] );
> }
The elsif statement on line 222 should read:
> elsif (@_ % 2 == 0) {
> %entries = ( '' => [ @_ ] );
> }
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=6.06
DISTRIB_CODENAME=dapper
DISTRIB_DESCRIPTION="Ubuntu 6.06.2 LTS"
$ apt-cache policy liblocale-maketext-lexicon-perl
liblocale-maketext-lexicon-perl:
Installed: 0.53-1
Candidate: 0.53-1
Version table:
*** 0.53-1 0
500 http://archive.ubuntu.com dapper/universe Packages
100 /var/lib/dpkg/status
Thanks.
** Affects: liblocale-maketext-lexicon-perl (Ubuntu)
Importance: Undecided
Status: New
--
Broken argument parsing in Lexicon::import().
https://bugs.launchpad.net/bugs/321688
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
--
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs
More information about the universe-bugs
mailing list