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
+ }
}