From: Jarkko Hietaniemi <jhi@iki.fi>
Date: Wed, 7 Mar 2001 00:41:16 +0000 (+0000)
Subject: More tweakage on the Unicode character class descriptions.
X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f586891147968a00cb7ac4921d1b2a415e9091bd;p=p5sagit%2Fp5-mst-13.2.git

More tweakage on the Unicode character class descriptions.

p4raw-id: //depot/perl@9062
---

diff --git a/lib/unicode/mktables.PL b/lib/unicode/mktables.PL
index bb25305..dbc2ed1 100755
--- a/lib/unicode/mktables.PL
+++ b/lib/unicode/mktables.PL
@@ -31,7 +31,8 @@ mkdir "To", 0755;
     ['IsSpacePerl',
                  '$cat  =~ /^Z/ ||
                   $code =~ /^(0009|000A|000C|000D)$/',		''],
-    ['IsBlank',  '$cat  =~ /^Z[^lp]$/ ||  $code eq "0009"',	''],
+    ['IsBlank',  '$code =~ /^(0020|0009)$/ ||
+		  $cat  =~ /^Z[^lp]$/',	''],
     ['IsDigit',  '$cat =~ /^Nd$/',	''],
     ['IsUpper',  '$cat =~ /^L[ut]$/',	''],
     ['IsLower',  '$cat =~ /^Ll$/',	''],
diff --git a/pod/perlretut.pod b/pod/perlretut.pod
index ad62873..fa6479c 100644
--- a/pod/perlretut.pod
+++ b/pod/perlretut.pod
@@ -1725,20 +1725,20 @@ traditional Unicode classes:
 
     Perl class name  Unicode class name or regular expression
 
-    IsAlpha          ^[LM]
-    IsAlnum          ^[LMN]
-    IsASCII          $code le 127
-    IsCntrl          ^C
-    IsBlank          ^Z[^lp] or $code eq "0009"
+    IsAlpha          /^[LM]/
+    IsAlnum          /^[LMN]/
+    IsASCII          $code <= 127
+    IsCntrl          /^C/
+    IsBlank          $code =~ /^(0020|0009)$/ || /^Z[^lp]/
     IsDigit          Nd
-    IsGraph          ^([LMNPS]|Co)
+    IsGraph          /^([LMNPS]|Co)/
     IsLower          Ll
-    IsPrint          ^([LMNPS]|Co|Zs)
-    IsPunct          ^P
-    IsSpace          ^Z or ($code =~ /^(0009|000A|000B|000C|000D)$/
-    IsSpacePerl      ^Z or ($code =~ /^(0009|000A|000C|000D)$/
-    IsUpper          ^L[ut]
-    IsWord           ^[LMN] or $code eq "005F"
+    IsPrint          /^([LMNPS]|Co|Zs)/
+    IsPunct          /^P/
+    IsSpace          /^Z/ || ($code =~ /^(0009|000A|000B|000C|000D)$/
+    IsSpacePerl      /^Z/ || ($code =~ /^(0009|000A|000C|000D)$/
+    IsUpper          /^L[ut]/
+    IsWord           /^[LMN]/ || $code eq "005F"
     IsXDigit         $code =~ /^00(3[0-9]|[46][1-6])$/
 
 You can also use the official Unicode class names with the C<\p> and