From: Ben Tilly Date: Sun, 9 Dec 2001 12:55:15 +0000 (-0500) Subject: RE: Exporter fixes reversed in 13540? X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9615f2eee7daabb211e5274ef9d9389a58bd4e0c;p=p5sagit%2Fp5-mst-13.2.git RE: Exporter fixes reversed in 13540? Message-ID: <3C13F455@operamail.com> p4raw-id: //depot/perl@13580 --- diff --git a/lib/open.pm b/lib/open.pm index 79cd61b..e5d18fb 100644 --- a/lib/open.pm +++ b/lib/open.pm @@ -11,9 +11,13 @@ sub in_locale { $^H & $locale::hint_bits } sub _get_locale_encoding { unless (defined $locale_encoding) { # I18N::Langinfo isn't available everywhere - eval "use I18N::Langinfo qw(langinfo CODESET)"; - unless ($@) { + eval { + require I18N::Langinfo; + I18N::Langinfo->import(qw(langinfo CODESET)); $locale_encoding = langinfo(CODESET()); + }; + unless ($@) { + print "# locale_encoding = $locale_encoding\n"; } my $country_language; if (not $locale_encoding && in_locale()) {