Skip Menu |
 

This queue is for tickets about the Locales CPAN distribution.

Report information
The Basics
Id: 50679
Status: resolved
Priority: 0/
Queue: Locales

People
Owner: Nobody in particular
Requestors: dmuey [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 0.07

Attachments
rt50679-part2.patch
rt50679-part3.patch



Subject: use base fixup
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: text/plain
Charset: utf8
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 235
Download (untitled) / with headers
text/plain 235b
in some environments we need to use MOD; before we can use base qw(MOD); Locales/Language.pm: use Locales::Base (); use Locales::Language::Base (); Locales/Country.pm: use Locales::Base (); use Locales::Country::Base ();
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Charset: utf8
Content-Type: multipart/mixed; boundary="----------=_1256065903-3617-129"
Message-ID: <rt-3.6.HEAD-3617-1256065903-511.50679-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 180
Download (untitled) / with headers
text/plain 180b
w/ above change setData needs fixed (ultimately needs reworked) for now or you get weird errors about trying to modify a readonly value in $@ when eval is attempted. very odd ...
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: multipart/mixed; boundary="----------=_1256065903-3617-128"
Charset: utf8
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 0
Content-Type: application/octet-stream; name="rt50679-part2.patch"
Content-Disposition: inline; filename="rt50679-part2.patch"
Content-Transfer-Encoding: base64
Content-Length: 0
MIME-Version: 1.0
In-Reply-To: <rt-3.6.HEAD-3617-1256065903-511.50679-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Charset: utf8
References: <rt-3.6.HEAD-3617-1256065903-511.50679-0-0 [...] rt.cpan.org>
Content-Type: multipart/mixed; boundary="----------=_1256077970-3617-133"
Message-ID: <rt-3.6.HEAD-3617-1256077970-780.50679-0-0 [...] rt.cpan.org>
X-RT-Original-Encoding: utf-8
Content-Length: 0
Content-Disposition: inline
Content-Type: text/plain
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 140
Download (untitled) / with headers
text/plain 140b
another set of AUTOLOAD fix ups that are also necessary under certain circumstances (this module needs a rewrite, it's way too complex ;p)
MIME-Version: 1.0
X-Mailer: MIME-tools 5.427 (Entity 5.427)
Content-Type: multipart/mixed; boundary="----------=_1256077970-3617-132"
Charset: utf8
Content-Length: 0
Content-Type: text/plain
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: iso-8859-1
Content-Length: 0
Content-Type: application/octet-stream; name="rt50679-part3.patch"
Content-Disposition: inline; filename="rt50679-part3.patch"
Content-Transfer-Encoding: base64
Content-Length: 1998
Download rt50679-part3.patch
text/x-diff 1.9k
Index: Locales/Base.pm =================================================================== --- Locales/Base.pm (revision 40497) +++ Locales/Base.pm (revision 40498) @@ -118,7 +118,7 @@ unless ( eval "require $module;" ) { my $defaultLocale = _getDefaultLocale; if ( $locale eq $defaultLocale ) { - warn ( "$defaultLocale is unsupported, trying $FALLBACK_LOCALE" ); + warn ( "$defaultLocale is unsupported, trying $FALLBACK_LOCALE" ) unless $defaultLocale eq $FALLBACK_LOCALE; $object = _loadFallBackLocale($caller); } else { Index: Locales/Country.pm =================================================================== --- Locales/Country.pm (revision 40497) +++ Locales/Country.pm (revision 40498) @@ -65,7 +65,18 @@ my ($method) = ( $AUTOLOAD =~ /::([^:]+)$/ ); return unless ( $method ); - $self->$method ( $arg ); + if ($self->can($method)) { + return $self->$method ( $arg ); + } + elsif (Locales::Country::Base->can($method)) { + return Locales::Country::Base->$method( $arg ); + } + elsif(Locales::Base->can($method)) { + return Locales::Base->$method( $arg ); + } + else { + $self->$method ( $arg ); # we already know this will fail but we want perl to give the message + } } Index: Locales/Language.pm =================================================================== --- Locales/Language.pm (revision 40497) +++ Locales/Language.pm (revision 40498) @@ -60,7 +60,18 @@ my ($method) = ( $AUTOLOAD =~ /::([^:]+)$/ ); return unless ( $method ); - $self->$method ( $arg ); + if ($self->can($method)) { + return $self->$method ( $arg ); + } + elsif (Locales::Language::Base->can($method)) { + return Locales::Language::Base->$method( $arg ); + } + elsif(Locales::Base->can($method)) { + return Locales::Base->$method( $arg ); + } + else { + $self->$method ( $arg ); # we already know this will fail but we want perl to give the message + } }


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.