aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngelo Naselli <anaselli@linux.it>2014-09-01 22:38:40 +0200
committerAngelo Naselli <anaselli@linux.it>2014-09-01 22:38:40 +0200
commitf18bc044d8e533cd07956df2e5030c2d3c8d3d93 (patch)
tree653b6a83e2ed7adb336822b46a19bf3eb26aef28
parent4dfaadd0e64eac747e931412b33e073e1e7c05ba (diff)
downloadmanatools-f18bc044d8e533cd07956df2e5030c2d3c8d3d93.tar
manatools-f18bc044d8e533cd07956df2e5030c2d3c8d3d93.tar.gz
manatools-f18bc044d8e533cd07956df2e5030c2d3c8d3d93.tar.bz2
manatools-f18bc044d8e533cd07956df2e5030c2d3c8d3d93.tar.xz
manatools-f18bc044d8e533cd07956df2e5030c2d3c8d3d93.zip
perl 5.20.0 does not like that an external lib set locales
-rw-r--r--lib/AdminPanel/Shared/Locales.pm5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/AdminPanel/Shared/Locales.pm b/lib/AdminPanel/Shared/Locales.pm
index 4bb14740..2015a487 100644
--- a/lib/AdminPanel/Shared/Locales.pm
+++ b/lib/AdminPanel/Shared/Locales.pm
@@ -120,6 +120,11 @@ has 'domain' => (
sub BUILD {
my $self = shift;
+ if ($^V ge v5.20.0) {
+ require POSIX;
+ POSIX::setlocale (POSIX::LC_ALL (), '');
+ }
+
$self->domain(Locale::gettext->domain_raw($self->domain_name));
$self->domain->dir($self->dir_name) if $self->dir_name;
$self->domain->codeset($self->codeset)