Change 13703 by jhi@alpha on 2001/12/15 17:30:55

        The hoops one has to jump through.

Affected files ...

.... //depot/perl/ext/I18N/Langinfo/Langinfo.pm#4 edit

Differences ...

==== //depot/perl/ext/I18N/Langinfo/Langinfo.pm#4 (text) ====
Index: perl/ext/I18N/Langinfo/Langinfo.pm
--- perl/ext/I18N/Langinfo/Langinfo.pm.~1~      Sat Dec 15 10:45:06 2001
+++ perl/ext/I18N/Langinfo/Langinfo.pm  Sat Dec 15 10:45:06 2001
@@ -165,7 +165,8 @@
 
 for the character code set being used (such as "ISO8859-1", "cp850",
 "koi8-r", "sjis", "utf8", etc.), for the currency string, for the
-radix character (yes, this is redundant with POSIX::localeconv())
+radix character used between the integer and the fractional part
+of decimal numbers (yes, this is redundant with POSIX::localeconv())
 
     YESSTR YESEXPR NOSTR NOEXPR
 
@@ -179,6 +180,17 @@
 constants.  (Often this means having to look directly at the
 F<langinfo.h> C header file.)
 
+Note that unfortunately none of the above constants are guaranteed
+to be available on a particular platform.  To be on the safe side
+you can wrap the import in an eval like this:
+
+    eval {
+        require I18N::Langinfo;
+        I18N::Langinfo->import(qw(langinfo CODESET));
+        $codeset = langinfo(CODESET()); # note the ()
+    };
+    if (!$@) { ... failed ... }
+
 =head2 EXPORT
 
 Nothing is exported by default.
End of Patch.

Reply via email to