summaryrefslogtreecommitdiff
path: root/regen/mk_PL_charclass.pl
diff options
context:
space:
mode:
authorKarl Williamson <public@khwilliamson.com>2012-12-11 20:47:25 -0700
committerKarl Williamson <public@khwilliamson.com>2012-12-22 11:11:27 -0700
commit15861f948fe52aa0c72233cd9dfc0190bfa3fbb1 (patch)
tree68e1d074c5f89237a0bcbc739836c5aac749cac9 /regen/mk_PL_charclass.pl
parentfbc19f27a35cc90f77285a47de2ff0dd21ff50c6 (diff)
downloadperl-15861f948fe52aa0c72233cd9dfc0190bfa3fbb1.tar.gz
handy.h: Create isALPHANUMERIC() and kin
Perl has had an undocumented macro isALNUMC() for a long time. I want to document it, but the name is very obscure. Neither Yves nor I are sure what it is. My best guess is "C's alnum". It corresponds to /[[:alnum:]]/, and so its best name would be isALNUM(). But that is the name long given to what matches \w. A new synonym, isWORDCHAR(), has been in place for several releases for that, but the old isALNUM() should remain for backwards compatibility. I don't think that the name isALNUMC() should be published, as it is too close to isALNUM(). I finally came to the conclusion that isALPHANUMERIC() is the best name; it describes its purpose clearly; the disadvantage is its long length. I doubt that it will get much use, but we need something, I think, that we can publish to accomplish this functionality. This commit also converts core uses of isALNUMC to isALPHANUMERIC. (I intended to that separately, but made a mistake in rebasing, and combined the two patches; and it seemed like not a big enough problem to separate them out again.)
Diffstat (limited to 'regen/mk_PL_charclass.pl')
-rw-r--r--regen/mk_PL_charclass.pl4
1 files changed, 2 insertions, 2 deletions
diff --git a/regen/mk_PL_charclass.pl b/regen/mk_PL_charclass.pl
index 33b7c872f0..33f8813798 100644
--- a/regen/mk_PL_charclass.pl
+++ b/regen/mk_PL_charclass.pl
@@ -23,7 +23,7 @@ require 'regen/regen_lib.pl';
my @properties = qw(
NONLATIN1_FOLD
- ALNUMC
+ ALPHANUMERIC
ALPHA
ASCII
BLANK
@@ -192,7 +192,7 @@ for my $ord (0..255) {
$re = qr/[\v\p{Space}]/;
} elsif ($name eq 'WORDCHAR') {
$re = qr/\p{XPosixWord}/;
- } elsif ($name eq 'ALNUMC') {
+ } elsif ($name eq 'ALPHANUMERIC') {
# Like \w, but no underscore
$re = qr/\p{Alnum}/;
} elsif ($name eq 'QUOTEMETA') {