diff options
author | Ben Tilly <ben_tilly@operamail.com> | 2001-12-09 07:55:15 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-10 01:53:11 +0000 |
commit | 9615f2eee7daabb211e5274ef9d9389a58bd4e0c (patch) | |
tree | 7d19cfae04efff5ce8afa1b71acce393a4dc795d /lib/open.pm | |
parent | 860599f1563eb187b3ec0b74653ad9a88d0147d0 (diff) | |
download | perl-9615f2eee7daabb211e5274ef9d9389a58bd4e0c.tar.gz |
RE: Exporter fixes reversed in 13540?
Message-ID: <3C13F455@operamail.com>
p4raw-id: //depot/perl@13580
Diffstat (limited to 'lib/open.pm')
-rw-r--r-- | lib/open.pm | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/open.pm b/lib/open.pm index 79cd61b233..e5d18fb525 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()) { |