From: Jarkko Hietaniemi Date: Tue, 4 Dec 2001 14:39:38 +0000 (+0000) Subject: Make the eval runtime. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=276c9210946afd5a25f08e38e69079c3d3456630;p=p5sagit%2Fp5-mst-13.2.git Make the eval runtime. p4raw-id: //depot/perl@13459 --- diff --git a/lib/open.pm b/lib/open.pm index 5140f6b..79cd61b 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()); }