summaryrefslogtreecommitdiff
path: root/t/loc_tools.pl
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2019-04-13 12:01:40 -0600
committerKarl Williamson <khw@cpan.org>2019-04-13 12:16:11 -0600
commitd373bd46faf465c035c57e089175139afb75d0b3 (patch)
tree722928d3a54ae238f1863981e67b8549cb1c0457 /t/loc_tools.pl
parentcade8963c79543f3abf3bb132b6119ac86a0929d (diff)
downloadperl-d373bd46faf465c035c57e089175139afb75d0b3.tar.gz
t/loc_tools.pl: miniperl can't use locale handling
Assume there is no locale handling on this system in the function locales_enabled() if we are operating (as in minitest) without the boot loader, as they can't be accessed because the POSIX module which contains setlocale() can't be loaded.
Diffstat (limited to 't/loc_tools.pl')
-rw-r--r--t/loc_tools.pl4
1 files changed, 4 insertions, 0 deletions
diff --git a/t/loc_tools.pl b/t/loc_tools.pl
index 01426c88e8..2d35c59ceb 100644
--- a/t/loc_tools.pl
+++ b/t/loc_tools.pl
@@ -210,6 +210,10 @@ sub locales_enabled(;$) {
# khw cargo-culted the '?' in the pattern on the next line.
return 0 if $Config{ccflags} =~ /\bD?NO_LOCALE\b/;
+ # If we can't load the POSIX XS module, we can't have locales even if they
+ # normally would be available
+ return 0 if ! defined &DynaLoader::boot_DynaLoader;
+
if (! $Config{d_setlocale}) {
return 0 if $Config{ccflags} =~ /\bD?NO_POSIX_2008_LOCALE\b/;
return 0 unless $Config{d_newlocale};