Skip Menu |
 

This queue is for tickets about the libintl-perl CPAN distribution.

Report information
The Basics
Id: 37762
Status: resolved
Priority: 0/
Queue: libintl-perl

People
Owner: GUIDO [...] cpan.org
Requestors: svysh [...] pn.sinp.msu.ru
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.16
Fixed in: (no value)



Subject: Locale::Messages::select_package ignores first argument
Download (untitled) / with headers
text/plain 453b
libintl-perl-1.16 perl v5.8.8 freebsd 6.3 Locale::Messages::select_package has 1 extra argument. You have to supply first fake argument, if you want this function to understand your second argument. In other words, if you give to it only 1 argument, then it _always_ makes the default "xs" choice. E.g., if I want gettext_pp to be called, then I should call select_package as follows: Locale::Messages::select_package(gettext_pp, gettext_pp)
Download (untitled) / with headers
text/plain 424b
Oops, you're right, fixed in CVS: sub select_package { my ($pkg, $compatibility) = @_; # Compatibility quirk for a bug pre 1.17: if (__PACKAGE__ eq $pkg && defined $compatibility) { $pkg = $compatibility; } ... In your own code, please use it as a class method: Locale::Messages->select_package ($my_choice); This will continue to work with upcoming versions.
Fixed in libintl-perl 1.17.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.