summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorKarl Williamson <khw@cpan.org>2016-02-11 20:24:37 -0700
committerKarl Williamson <khw@cpan.org>2016-02-11 20:29:08 -0700
commit47ed9d9e89922a8e165d6dfc5737772cc5ee7a45 (patch)
tree9469d65f743aabaeb8aadd4d47c15f2e4a149c75 /ext
parentbef74c256c389edeb1dfa9c30dc71e00d17476eb (diff)
downloadperl-47ed9d9e89922a8e165d6dfc5737772cc5ee7a45.tar.gz
Remove POSIX isfoo() as scheduled
The functions like isalnum() have been scheduled for removal in 5.24. This does that.
Diffstat (limited to 'ext')
-rw-r--r--ext/POSIX/POSIX.xs96
-rw-r--r--ext/POSIX/lib/POSIX.pm2
-rw-r--r--ext/POSIX/lib/POSIX.pod189
-rw-r--r--ext/POSIX/t/is.t140
-rw-r--r--ext/POSIX/t/posix.t36
5 files changed, 35 insertions, 428 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 12da49fb0a..f46fedc430 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -1778,102 +1778,6 @@ my_tzset(pTHX)
tzset();
}
-typedef int (*isfunc_t)(int);
-typedef void (*any_dptr_t)(void *);
-
-/* This needs to be ALIASed in a custom way, hence can't easily be defined as
- a regular XSUB. */
-static XSPROTO(is_common); /* prototype to pass -Wmissing-prototypes */
-static XSPROTO(is_common)
-{
- dXSARGS;
-
- if (items != 1)
- croak_xs_usage(cv, "charstring");
-
- {
- dXSTARG;
- STRLEN len;
- /*int RETVAL = 0; YYY means uncomment this to return false on an
- * empty string input */
- int RETVAL;
- unsigned char *s = (unsigned char *) SvPV(ST(0), len);
- unsigned char *e = s + len;
- isfunc_t isfunc = (isfunc_t) XSANY.any_dptr;
-
- if (ckWARN_d(WARN_DEPRECATED)) {
-
- /* Warn exactly once for each lexical place this function is
- * called. See thread at
- * http://markmail.org/thread/jhqcag5njmx7jpyu */
-
- HV *warned = get_hv("POSIX::_warned", GV_ADD | GV_ADDMULTI);
- if (! hv_exists(warned, (const char *)&PL_op, sizeof(PL_op))) {
- Perl_warner(aTHX_ packWARN(WARN_DEPRECATED),
- "Calling POSIX::%"HEKf"() is deprecated",
- HEKfARG(GvNAME_HEK(CvGV(cv))));
- (void)hv_store(warned, (const char *)&PL_op, sizeof(PL_op), &PL_sv_yes, 0);
- }
- }
-
- /*if (e > s) { YYY */
- for (RETVAL = 1; RETVAL && s < e; s++)
- if (!isfunc(*s))
- RETVAL = 0;
- /*} YYY */
- XSprePUSH;
- PUSHi((IV)RETVAL);
- }
- XSRETURN(1);
-}
-
-MODULE = POSIX PACKAGE = POSIX
-
-BOOT:
-{
- CV *cv;
-
-
- /* silence compiler warning about not_here() defined but not used */
- if (0) not_here("");
-
- /* Ensure we get the function, not a macro implementation. Like the C89
- standard says we can... */
-#undef isalnum
- cv = newXS_deffile("POSIX::isalnum", is_common);
- XSANY.any_dptr = (any_dptr_t) &isalnum;
-#undef isalpha
- cv = newXS_deffile("POSIX::isalpha", is_common);
- XSANY.any_dptr = (any_dptr_t) &isalpha;
-#undef iscntrl
- cv = newXS_deffile("POSIX::iscntrl", is_common);
- XSANY.any_dptr = (any_dptr_t) &iscntrl;
-#undef isdigit
- cv = newXS_deffile("POSIX::isdigit", is_common);
- XSANY.any_dptr = (any_dptr_t) &isdigit;
-#undef isgraph
- cv = newXS_deffile("POSIX::isgraph", is_common);
- XSANY.any_dptr = (any_dptr_t) &isgraph;
-#undef islower
- cv = newXS_deffile("POSIX::islower", is_common);
- XSANY.any_dptr = (any_dptr_t) &islower;
-#undef isprint
- cv = newXS_deffile("POSIX::isprint", is_common);
- XSANY.any_dptr = (any_dptr_t) &isprint;
-#undef ispunct
- cv = newXS_deffile("POSIX::ispunct", is_common);
- XSANY.any_dptr = (any_dptr_t) &ispunct;
-#undef isspace
- cv = newXS_deffile("POSIX::isspace", is_common);
- XSANY.any_dptr = (any_dptr_t) &isspace;
-#undef isupper
- cv = newXS_deffile("POSIX::isupper", is_common);
- XSANY.any_dptr = (any_dptr_t) &isupper;
-#undef isxdigit
- cv = newXS_deffile("POSIX::isxdigit", is_common);
- XSANY.any_dptr = (any_dptr_t) &isxdigit;
-}
-
MODULE = SigSet PACKAGE = POSIX::SigSet PREFIX = sig
void
diff --git a/ext/POSIX/lib/POSIX.pm b/ext/POSIX/lib/POSIX.pm
index abacfddc8d..2a5829cd5a 100644
--- a/ext/POSIX/lib/POSIX.pm
+++ b/ext/POSIX/lib/POSIX.pm
@@ -4,7 +4,7 @@ use warnings;
our ($AUTOLOAD, %SIGRT);
-our $VERSION = '1.62';
+our $VERSION = '1.63';
require XSLoader;
diff --git a/ext/POSIX/lib/POSIX.pod b/ext/POSIX/lib/POSIX.pod
index fdb95e014a..b888561ad4 100644
--- a/ext/POSIX/lib/POSIX.pod
+++ b/ext/POSIX/lib/POSIX.pod
@@ -713,38 +713,15 @@ See also L</isinf>, and L</fpclassify>.
=item C<isalnum>
-Deprecated function whose use raises a warning, and which is slated to
-be removed in a future Perl version. It is very similar to matching
-against S<C<qr/ ^ [[:alnum:]]+ $ /x>>, which you should convert to use
-instead. The function is deprecated because 1) it doesn't handle UTF-8
-encoded strings properly; and 2) it returns C<TRUE> even if the input is
-the empty string. The function return is always based on the current
-locale, whereas using locale rules is optional with the regular
-expression, based on pragmas in effect and pattern modifiers (see
-L<perlre/Character set modifiers> and L<perlre/Which character set
-modifier is in effect?>).
-
-The function returns C<TRUE> if the input string is empty, or if the
-corresponding C function returns C<TRUE> for every byte in the string.
-
-You may want to use the C<L<E<sol>\wE<sol>|perlrecharclass/Word
-characters>> construct instead.
+This function has been removed as of v5.24. It was very similar to
+matching against S<C<qr/ ^ [[:alnum:]]+ $ /x>>, which you should convert
+to use instead. See L<perlrecharclass/POSIX Character Classes>.
=item C<isalpha>
-Deprecated function whose use raises a warning, and which is slated to
-be removed in a future Perl version. It is very similar to matching
-against S<C<qr/ ^ [[:alpha:]]+ $ /x>>, which you should convert to use
-instead. The function is deprecated because 1) it doesn't handle UTF-8
-encoded strings properly; and 2) it returns C<TRUE> even if the input is
-the empty string. The function return is always based on the current
-locale, whereas using locale rules is optional with the regular
-expression, based on pragmas in effect and pattern modifiers (see
-L<perlre/Character set modifiers> and L<perlre/Which character set
-modifier is in effect?>).
-
-The function returns C<TRUE> if the input string is empty, or if the
-corresponding C function returns C<TRUE> for every byte in the string.
+This function has been removed as of v5.24. It was very similar to
+matching against S<C<qr/ ^ [[:alpha:]]+ $ /x>>, which you should convert
+to use instead. See L<perlrecharclass/POSIX Character Classes>.
=item C<isatty>
@@ -753,38 +730,15 @@ to a tty. Similar to the C<-t> operator, see L<perlfunc/-X>.
=item C<iscntrl>
-Deprecated function whose use raises a warning, and which is slated to
-be removed in a future Perl version. It is very similar to matching
-against S<C<qr/ ^ [[:cntrl:]]+ $ /x>>, which you should convert to use
-instead. The function is deprecated because 1) it doesn't handle UTF-8
-encoded strings properly; and 2) it returns C<TRUE> even if the input is
-the empty string. The function return is always based on the current
-locale, whereas using locale rules is optional with the regular
-expression, based on pragmas in effect and pattern modifiers (see
-L<perlre/Character set modifiers> and L<perlre/Which character set
-modifier is in effect?>).
-
-The function returns C<TRUE> if the input string is empty, or if the
-corresponding C function returns C<TRUE> for every byte in the string.
+This function has been removed as of v5.24. It was very similar to
+matching against S<C<qr/ ^ [[:cntrl:]]+ $ /x>>, which you should convert
+to use instead. See L<perlrecharclass/POSIX Character Classes>.
=item C<isdigit>
-Deprecated function whose use raises a warning, and which is slated to
-be removed in a future Perl version. It is very similar to matching
-against S<C<qr/ ^ [[:digit:]]+ $ /x>>, which you should convert to use
-instead. The function is deprecated because 1) it doesn't handle UTF-8
-encoded strings properly; and 2) it returns C<TRUE> even if the input is
-the empty string. The function return is always based on the current
-locale, whereas using locale rules is optional with the regular
-expression, based on pragmas in effect and pattern modifiers (see
-L<perlre/Character set modifiers> and L<perlre/Which character set
-modifier is in effect?>).
-
-The function returns C<TRUE> if the input string is empty, or if the
-corresponding C function returns C<TRUE> for every byte in the string.
-
-You may want to use the C<L<E<sol>\dE<sol>|perlrecharclass/Digits>>
-construct instead.
+This function has been removed as of v5.24. It was very similar to
+matching against S<C<qr/ ^ [[:digit:]]+ $ /x>>, which you should convert
+to use instead. See L<perlrecharclass/POSIX Character Classes>.
=item C<isfinite>
@@ -795,19 +749,9 @@ See also L</isinf>, L</isnan>, and L</fpclassify>.
=item C<isgraph>
-Deprecated function whose use raises a warning, and which is slated to
-be removed in a future Perl version. It is very similar to matching
-against S<C<qr/ ^ [[:graph:]]+ $ /x>>, which you should convert to use
-instead. The function is deprecated because 1) it doesn't handle UTF-8
-encoded strings properly; and 2) it returns C<TRUE> even if the input is
-the empty string. The function return is always based on the current
-locale, whereas using locale rules is optional with the regular
-expression, based on pragmas in effect and pattern modifiers (see
-L<perlre/Character set modifiers> and L<perlre/Which character set
-modifier is in effect?>).
-
-The function returns C<TRUE> if the input string is empty, or if the
-corresponding C function returns C<TRUE> for every byte in the string.
+This function has been removed as of v5.24. It was very similar to
+matching against S<C<qr/ ^ [[:graph:]]+ $ /x>>, which you should convert
+to use instead. See L<perlrecharclass/POSIX Character Classes>.
=item C<isgreater>
@@ -824,21 +768,9 @@ See also L</Inf>, L</isnan>, L</isfinite>, and L</fpclassify>.
=item C<islower>
-Deprecated function whose use raises a warning, and which is slated to
-be removed in a future Perl version. It is very similar to matching
-against S<C<qr/ ^ [[:lower:]]+ $ /x>>, which you should convert to use
-instead. The function is deprecated because 1) it doesn't handle UTF-8
-encoded strings properly; and 2) it returns C<TRUE> even if the input is
-the empty string. The function return is always based on the current
-locale, whereas using locale rules is optional with the regular
-expression, based on pragmas in effect and pattern modifiers (see
-L<perlre/Character set modifiers> and L<perlre/Which character set
-modifier is in effect?>).
-
-The function returns C<TRUE> if the input string is empty, or if the
-corresponding C function returns C<TRUE> for every byte in the string.
-
-Do B<not> use C</[a-z]/> unless you don't care about the current locale.
+This function has been removed as of v5.24. It was very similar to
+matching against S<C<qr/ ^ [[:lower:]]+ $ /x>>, which you should convert
+to use instead. See L<perlrecharclass/POSIX Character Classes>.
=item C<isnan>
@@ -861,35 +793,15 @@ See also L</isfinite>, and L</fpclassify>.
=item C<isprint>
-Deprecated function whose use raises a warning, and which is slated to
-be removed in a future Perl version. It is very similar to matching
-against S<C<qr/ ^ [[:print:]]+ $ /x>>, which you should convert to use
-instead. The function is deprecated because 1) it doesn't handle UTF-8
-encoded strings properly; and 2) it returns C<TRUE> even if the input is
-the empty string. The function return is always based on the current
-locale, whereas using locale rules is optional with the regular
-expression, based on pragmas in effect and pattern modifiers (see
-L<perlre/Character set modifiers> and L<perlre/Which character set
-modifier is in effect?>).
-
-The function returns C<TRUE> if the input string is empty, or if the
-corresponding C function returns C<TRUE> for every byte in the string.
+This function has been removed as of v5.24. It was very similar to
+matching against S<C<qr/ ^ [[:print:]]+ $ /x>>, which you should convert
+to use instead. See L<perlrecharclass/POSIX Character Classes>.
=item C<ispunct>
-Deprecated function whose use raises a warning, and which is slated to
-be removed in a future Perl version. It is very similar to matching
-against S<C<qr/ ^ [[:punct:]]+ $ /x>>, which you should convert to use
-instead. The function is deprecated because 1) it doesn't handle UTF-8
-encoded strings properly; and 2) it returns C<TRUE> even if the input is
-the empty string. The function return is always based on the current
-locale, whereas using locale rules is optional with the regular
-expression, based on pragmas in effect and pattern modifiers (see
-L<perlre/Character set modifiers> and L<perlre/Which character set
-modifier is in effect?>).
-
-The function returns C<TRUE> if the input string is empty, or if the
-corresponding C function returns C<TRUE> for every byte in the string.
+This function has been removed as of v5.24. It was very similar to
+matching against S<C<qr/ ^ [[:punct:]]+ $ /x>>, which you should convert
+to use instead. See L<perlrecharclass/POSIX Character Classes>.
=item C<issignaling>
@@ -904,56 +816,21 @@ See L</nan> for more discussion about C<NaN>.
=item C<isspace>
-Deprecated function whose use raises a warning, and which is slated to
-be removed in a future Perl version. It is very similar to matching
-against S<C<qr/ ^ [[:space:]]+ $ /x>>, which you should convert to use
-instead. The function is deprecated because 1) it doesn't handle UTF-8
-encoded strings properly; and 2) it returns C<TRUE> even if the input is
-the empty string. The function return is always based on the current
-locale, whereas using locale rules is optional with the regular
-expression, based on pragmas in effect and pattern modifiers (see
-L<perlre/Character set modifiers> and L<perlre/Which character set
-modifier is in effect?>).
-
-The function returns C<TRUE> if the input string is empty, or if the
-corresponding C function returns C<TRUE> for every byte in the string.
-
-You may want to use the C<L<E<sol>\sE<sol>|perlrecharclass/Whitespace>>
-construct instead.
+This function has been removed as of v5.24. It was very similar to
+matching against S<C<qr/ ^ [[:space:]]+ $ /x>>, which you should convert
+to use instead. See L<perlrecharclass/POSIX Character Classes>.
=item C<isupper>
-Deprecated function whose use raises a warning, and which is slated to
-be removed in a future Perl version. It is very similar to matching
-against S<C<qr/ ^ [[:upper:]]+ $ /x>>, which you should convert to use
-instead. The function is deprecated because 1) it doesn't handle UTF-8
-encoded strings properly; and 2) it returns C<TRUE> even if the input is
-the empty string. The function return is always based on the current
-locale, whereas using locale rules is optional with the regular
-expression, based on pragmas in effect and pattern modifiers (see
-L<perlre/Character set modifiers> and L<perlre/Which character set
-modifier is in effect?>).
-
-The function returns C<TRUE> if the input string is empty, or if the
-corresponding C function returns C<TRUE> for every byte in the string.
-
-Do B<not> use C</[A-Z]/> unless you don't care about the current locale.
+This function has been removed as of v5.24. It was very similar to
+matching against S<C<qr/ ^ [[:upper:]]+ $ /x>>, which you should convert
+to use instead. See L<perlrecharclass/POSIX Character Classes>.
=item C<isxdigit>
-Deprecated function whose use raises a warning, and which is slated to
-be removed in a future Perl version. It is very similar to matching
-against S<C<qr/ ^ [[:xdigit:]]+ $ /x>>, which you should convert to use
-instead. The function is deprecated because 1) it doesn't handle UTF-8
-encoded strings properly; and 2) it returns C<TRUE> even if the input is
-the empty string. The function return is always based on the current
-locale, whereas using locale rules is optional with the regular
-expression, based on pragmas in effect and pattern modifiers (see
-L<perlre/Character set modifiers> and L<perlre/Which character set
-modifier is in effect?>).
-
-The function returns C<TRUE> if the input string is empty, or if the
-corresponding C function returns C<TRUE> for every byte in the string.
+This function has been removed as of v5.24. It was very similar to
+matching against S<C<qr/ ^ [[:xdigit:]]+ $ /x>>, which you should
+convert to use instead. See L<perlrecharclass/POSIX Character Classes>.
=item C<j0>
diff --git a/ext/POSIX/t/is.t b/ext/POSIX/t/is.t
deleted file mode 100644
index 1625e03542..0000000000
--- a/ext/POSIX/t/is.t
+++ /dev/null
@@ -1,140 +0,0 @@
-#!./perl -w
-
-use strict;
-use Test::More;
-use Config;
-
-BEGIN {
- plan(skip_all => "\$^O eq '$^O'") if $^O eq 'VMS';
- plan(skip_all => "POSIX is unavailable")
- unless $Config{extensions} =~ /\bPOSIX\b/;
- unshift @INC, "../../t";
- require 'loc_tools.pl';
-}
-
-use POSIX;
-
-# E.g. \t might or might not be isprint() depending on the locale,
-# so let's reset to the default.
-setlocale(LC_ALL, 'C') if locales_enabled('LC_ALL');
-
-$| = 1;
-
-# List of characters (and strings) to feed to the is<xxx> functions.
-#
-# The left-hand side (key) is a character or string.
-# The right-hand side (value) is a list of character classes to which
-# this string belongs. This is a *complete* list: any classes not
-# listed, are expected to return '0' for the given string.
-my %classes =
- (
- 'a' => [ qw(print graph alnum alpha lower xdigit) ],
- 'A' => [ qw(print graph alnum alpha upper xdigit) ],
- 'z' => [ qw(print graph alnum alpha lower) ],
- 'Z' => [ qw(print graph alnum alpha upper) ],
- '0' => [ qw(print graph alnum digit xdigit) ],
- '9' => [ qw(print graph alnum digit xdigit) ],
- '.' => [ qw(print graph punct) ],
- '?' => [ qw(print graph punct) ],
- ' ' => [ qw(print space) ],
- "\t" => [ qw(cntrl space) ],
- "\001" => [ qw(cntrl) ],
-
- # Multi-character strings. These are logically ANDed, so the
- # presence of different types of chars in one string will
- # reduce the list on the right.
- 'abc' => [ qw(print graph alnum alpha lower xdigit) ],
- 'az' => [ qw(print graph alnum alpha lower) ],
- 'aZ' => [ qw(print graph alnum alpha) ],
- 'abc ' => [ qw(print) ],
-
- '012aF' => [ qw(print graph alnum xdigit) ],
-
- " \t" => [ qw(space) ],
-
- "abcde\001" => [],
-
- # An empty string. Always true (al least in old days) [bug #24554]
- '' => [ qw(print graph alnum alpha lower upper digit xdigit
- punct cntrl space) ],
- );
-
-
-# Pass 1: convert the above arrays to hashes. While doing so, obtain
-# a complete list of all the 'is<xxx>' functions. At least, the ones
-# listed above.
-my %functions;
-foreach my $s (keys %classes) {
- $classes{$s} = { map {
- $functions{"is$_"}++; # Keep track of all the 'is<xxx>' functions
- "is$_" => 1; # Our return value: is<xxx>($s) should pass.
- } @{$classes{$s}} };
-}
-
-# Expected number of tests is one each for every combination of a
-# known is<xxx> function and string listed above.
-plan(tests => keys(%classes) * keys(%functions) + 2);
-
-# Main test loop: Run all POSIX::is<xxx> tests on each string defined above.
-# Only the character classes listed for that string should return 1. We
-# always run all functions on every string, and expect to get 0 for the
-# character classes not listed in the given string's hash value.
-#
-foreach my $s (sort keys %classes) {
- foreach my $f (sort keys %functions) {
- my $expected = exists $classes{$s}->{$f};
- my $actual = eval "no warnings 'deprecated'; POSIX::$f( \$s )";
-
- cmp_ok($actual, '==', $expected, "$f('$s')");
- }
-}
-
-{
- my @warnings;
- local $SIG {__WARN__} = sub { push @warnings, @_; };
-
- foreach (0 .. 3) {
- my $a;
- $a =POSIX::isalnum("a");
- $a =POSIX::isalpha("a");
- $a =POSIX::iscntrl("a");
- $a =POSIX::isdigit("a");
- $a =POSIX::isgraph("a");
- $a =POSIX::islower("a");
- $a =POSIX::ispunct("a");
- $a =POSIX::isspace("a");
- $a =POSIX::isupper("a");
- $a =POSIX::isxdigit("a");
- $a =POSIX::isalnum("a");
- $a =POSIX::isalpha("a");
- $a =POSIX::iscntrl("a");
- $a =POSIX::isdigit("a");
- $a =POSIX::isgraph("a");
- $a =POSIX::islower("a");
- $a =POSIX::ispunct("a");
- $a =POSIX::isspace("a");
- $a =POSIX::isupper("a");
- $a =POSIX::isxdigit("a");
- }
-
- # Each of the 10 classes should warn twice, because each has 2 lexical
- # calls
- is(scalar @warnings, 20);
-}
-
-SKIP:
-{
- # [perl #122476] - is*() could crash when threads were involved on Win32
- # this only crashed on Win32, only test there
- # When the is*() functions are removed, also remove "iscrash"
- skip("Not Win32", 1) unless $^O eq "MSWin32";
- skip("No threads", 1) unless $Config{useithreads};
- skip("No Win32API::File", 1)
- unless $Config{extensions} =~ m(\bWin32API/File\b);
-
- local $ENV{PERL5LIB} =
- join($Config{path_sep},
- map / / ? qq("$_") : $_, @INC);
- my $result = `$^X t/iscrash`;
- like($result, qr/\bok\b/, "is in threads didn't crash");
-}
diff --git a/ext/POSIX/t/posix.t b/ext/POSIX/t/posix.t
index 0e5f086be5..bd5c3009fc 100644
--- a/ext/POSIX/t/posix.t
+++ b/ext/POSIX/t/posix.t
@@ -10,7 +10,7 @@ BEGIN {
require 'loc_tools.pl';
}
-use Test::More tests => 120;
+use Test::More tests => 94;
use POSIX qw(fcntl_h signal_h limits_h _exit getcwd open read strftime write
errno localeconv dup dup2 lseek access);
@@ -308,40 +308,6 @@ is ($result, undef, "fgets should fail");
like ($@, qr/^Use method IO::Handle::gets\(\) instead/,
"check its redef message");
-{
- no warnings 'deprecated';
- # Simplistic tests for the isXXX() functions (bug #16799)
- ok( POSIX::isalnum('1'), 'isalnum' );
- ok(!POSIX::isalnum('*'), 'isalnum' );
- ok( POSIX::isalpha('f'), 'isalpha' );
- ok(!POSIX::isalpha('7'), 'isalpha' );
- ok( POSIX::iscntrl("\cA"),'iscntrl' );
- ok(!POSIX::iscntrl("A"), 'iscntrl' );
- ok( POSIX::isdigit('1'), 'isdigit' );
- ok(!POSIX::isdigit('z'), 'isdigit' );
- ok( POSIX::isgraph('@'), 'isgraph' );
- ok(!POSIX::isgraph(' '), 'isgraph' );
- ok( POSIX::islower('l'), 'islower' );
- ok(!POSIX::islower('L'), 'islower' );
- ok( POSIX::isupper('U'), 'isupper' );
- ok(!POSIX::isupper('u'), 'isupper' );
- ok( POSIX::isprint('$'), 'isprint' );
- ok(!POSIX::isprint("\n"), 'isprint' );
- ok( POSIX::ispunct('%'), 'ispunct' );
- ok(!POSIX::ispunct('u'), 'ispunct' );
- ok( POSIX::isspace("\t"), 'isspace' );
- ok(!POSIX::isspace('_'), 'isspace' );
- ok( POSIX::isxdigit('f'), 'isxdigit' );
- ok(!POSIX::isxdigit('g'), 'isxdigit' );
- # metaphysical question : what should be returned for an empty string ?
- # anyway this shouldn't segfault (bug #24554)
- ok( POSIX::isalnum(''), 'isalnum empty string' );
- ok( POSIX::isalnum(undef),'isalnum undef' );
- # those functions should stringify their arguments
- ok(!POSIX::isalpha([]), 'isalpha []' );
- ok( POSIX::isprint([]), 'isprint []' );
-}
-
eval { use strict; POSIX->import("S_ISBLK"); my $x = S_ISBLK };
unlike( $@, qr/Can't use string .* as a symbol ref/, "Can import autoloaded constants" );