Subject: | [PATCH] Handle systems without setlocale() |
This is really to get the module to install on Android.
Subject: | 0001-Handle-systems-with-no-locale-support.patch |
From 0e28a0a381546d24811e60cefa4cfe40f80d5aa4 Mon Sep 17 00:00:00 2001
From: Brian Fraser <fraserbn@gmail.com>
Date: Sun, 3 Aug 2014 23:12:06 +0200
Subject: [PATCH] Handle systems with no locale support
---
lib/App/Sys/Info.pm | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/App/Sys/Info.pm b/lib/App/Sys/Info.pm
index 7788f62..fe28bd1 100644
--- a/lib/App/Sys/Info.pm
+++ b/lib/App/Sys/Info.pm
@@ -38,7 +38,7 @@ sub new {
my $class = shift;
my $i = Sys::Info->new;
my $self = {
- LOCALE => setlocale( LC_CTYPE ),
+ LOCALE => scalar eval { setlocale( LC_CTYPE ) },
NA => 'N/A',
info => $i,
os => $i->os,
--
1.7.12.4 (Apple Git-37)