This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
run/locale.t: Use langinfo not localeconv
authorKarl Williamson <khw@cpan.org>
Thu, 4 Aug 2022 21:48:13 +0000 (15:48 -0600)
committerKarl Williamson <khw@cpan.org>
Mon, 22 Aug 2022 12:52:08 +0000 (06:52 -0600)
t/run/locale.t

index 0a4a80e..3d9b7a2 100644 (file)
@@ -21,6 +21,7 @@ BEGIN {
     }
 }
 use Config;
+use I18N::Langinfo qw(langinfo RADIXCHAR);
 my $have_strtod = $Config{d_strtod} eq 'define';
 my $have_localeconv = defined $Config{d_locconv} && $Config{d_locconv} eq 'define';
 my @locales = find_locales( [ 'LC_ALL', 'LC_CTYPE', 'LC_NUMERIC' ]);
@@ -141,7 +142,7 @@ EOF
         } else {
             $different ||= $_;
             $difference ||= $s;
-            my $radix = localeconv()->{decimal_point};
+            my $radix = langinfo(RADIXCHAR);
 
             # For utf8 locales with a non-ascii radix, it should be encoded as
             # UTF-8 with the internal flag so set.