Actually this is better:
diff --git a/Locales.pm b/Locales.pm
index 0ef9c54..4954269 100644
--- a/Locales.pm
--- a/Locales.pm
+++ b/Locales.pm
@@ -7,6 +7,10 @@ $Locales::cldr_version = '2.0'; # change in POD
my %singleton_stash;
+sub get_cldr_version {
+ return $Locales::cldr_version;
+}
+
sub new {
my ( $class, $tag ) = @_;
$tag = normalize_tag($tag) || 'en';
@@ -67,7 +71,7 @@ sub get_native_language_from_code {
my ( $self, $code, $always_return ) = @_;
my $class = ref($self) ? ref($self) : $self;
- if ( !exists $locale->{'native_data'} ) {
+ if ( !exists $self->{'native_data'} ) {
local $SIG{'__DIE__'}; # cpanel specific: ensure a benign eval does not trigger cpsrvd's
DIE handler (may be made moot by internal case 50857)
eval "require $class\::DB::Native;" || return;
no strict 'refs';
@@ -685,8 +689,8 @@ sub get_code_from_territory {
return;
}
-*code2territory = \&get_territory_from_code;
-*territory2code = \&get_code_from_territory;
+&code2territory = \&get_territory_from_code;
+&territory2code = \&get_code_from_territory;
#### language ####
@@ -736,8 +740,8 @@ sub get_code_from_language {
return;
}
-*code2language = \&get_language_from_code;
-*language2code = \&get_code_from_language;
+&code2language = \&get_language_from_code;
+&language2code = \&get_code_from_language;
#### utility functions ####