diff options
author | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-04 14:39:38 +0000 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-12-04 14:39:38 +0000 |
commit | 3ac1eca57f0f78805ed071b64aea4db3843dfbdf (patch) | |
tree | f9452fc617a8d028f88e729609094dafe77cc3b0 /lib/open.pm | |
parent | a7018e9050b9d8224b2f5d852b5e4408f7e182fb (diff) | |
download | perl-3ac1eca57f0f78805ed071b64aea4db3843dfbdf.tar.gz |
Make the eval runtime.
p4raw-id: //depot/perl@13459
Diffstat (limited to 'lib/open.pm')
-rw-r--r-- | lib/open.pm | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/lib/open.pm b/lib/open.pm index 5140f6b5c9..79cd61b233 100644 --- a/lib/open.pm +++ b/lib/open.pm @@ -10,11 +10,8 @@ sub in_locale { $^H & $locale::hint_bits } sub _get_locale_encoding { unless (defined $locale_encoding) { - eval { - # I18N::Langinfo isn't available everywhere - require I18N::Langinfo; - I18N::Langinfo->import('langinfo', 'CODESET'); - }; + # I18N::Langinfo isn't available everywhere + eval "use I18N::Langinfo qw(langinfo CODESET)"; unless ($@) { $locale_encoding = langinfo(CODESET()); } |