summaryrefslogtreecommitdiff
path: root/ext/XS-APItest/t
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2014-05-15 21:18:14 -0600
committerKarl Williamson <khw@cpan.org>2014-06-05 11:23:00 -0600
commit5f1269ab079ccc53073681a4adc4f6cf92114d91 (patch)
treef6d5d84d594bd6b45fb115610b5f6b4616e8e327 /ext/XS-APItest/t
parentc12840116686daefb4f2c59922677425930cd05f (diff)
downloadperl-5f1269ab079ccc53073681a4adc4f6cf92114d91.tar.gz
'use locale' no longer ever fails.to compile
Thus we can skip the machinations we used to do to make sure things compiled.
Diffstat (limited to 'ext/XS-APItest/t')
-rw-r--r--ext/XS-APItest/t/handy.t20
1 files changed, 6 insertions, 14 deletions
diff --git a/ext/XS-APItest/t/handy.t b/ext/XS-APItest/t/handy.t
index d68f9d9832..a434e2db68 100644
--- a/ext/XS-APItest/t/handy.t
+++ b/ext/XS-APItest/t/handy.t
@@ -22,11 +22,7 @@ if($Config{d_setlocale}) {
require POSIX;
$locale = POSIX::setlocale( &POSIX::LC_ALL, "C");
if (defined $locale && $locale eq 'C') {
- BEGIN {
- if($Config{d_setlocale}) {
- require locale; import locale; # make \w work right in non-ASCII lands
- }
- }
+ use locale; # make \w work right in non-ASCII lands
# Some locale implementations don't have the 128-255 characters all
# mean nothing. Skip the locale tests in that situation
@@ -154,8 +150,7 @@ foreach my $name (sort keys %properties) {
}
if (defined $locale) {
- require locale; import locale;
-
+ use locale;
POSIX::setlocale( &POSIX::LC_ALL, "C");
$ret = truth eval "test_is${function}_LC($i)";
if ($@) {
@@ -193,8 +188,7 @@ foreach my $name (sort keys %properties) {
}
if (defined $locale && $name ne 'vertws') {
- require locale; import locale;
-
+ use locale;
POSIX::setlocale( &POSIX::LC_ALL, "C");
$ret = truth eval "test_is${function}_LC_uvchr('$i')";
if ($@) {
@@ -232,8 +226,7 @@ foreach my $name (sort keys %properties) {
}
if ($name ne 'vertws' && defined $locale) {
- require locale; import locale;
-
+ use locale;
POSIX::setlocale( &POSIX::LC_ALL, "C");
$ret = truth eval "test_is${function}_LC_utf8('$char')";
if ($@) {
@@ -348,9 +341,8 @@ foreach my $name (sort keys %to_properties) {
if ($name ne 'TITLE') { # Test _LC; titlecase is not defined in locales.
if (defined $locale) {
- require locale; import locale;
-
- POSIX::setlocale( &POSIX::LC_ALL, "C");
+ use locale;
+ POSIX::setlocale( &POSIX::LC_ALL, "C");
$ret = eval "test_to${function}_LC($j)";
if ($@) {
fail($@);