p4raw-id: //depot/perl@13459
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());
}