Commit
569f7fc5d4ec06501b46a72075ff434fe1bf4332 caused this test file
to start failing on VMS. The reason is that the test for locale became
run-time. This patch restores the test to compile time, by using the
'if' module.
The reason 'if' wasn't used in the original patch was to reduce reliance
on possibly untested modules, but it makes things easier. We hope to
get a resolution on p5p on which test groups in the suite can use things
like 'if', but since 5.17.9 is due out momentarily, I'm using 'if' for
now so that VMS will pass its tests again.
BEGIN {
chdir 't' if -d 't';
@INC = '../lib';
- require Config; import Config;
require './test.pl';
}
use strict;
use warnings;
+use Config;
plan('no_plan');
require POSIX;
my $current_locale = POSIX::setlocale( &POSIX::LC_ALL, "C") // "";
if ($current_locale eq 'C') {
- require locale; import locale;
+
+ # test for d_setlocale is repeated here because this one is compile
+ # time, and the one above is run time
+ use if $Config{d_setlocale}, 'locale';
# Some locale implementations don't have the 128-255 characters all
# mean nothing. Skip the locale tests in that situation