Unicode properties: support \p{(?:Is)?L&} as an alias for \pL.
authorJarkko Hietaniemi <jhi@iki.fi>
Wed, 3 Oct 2001 16:12:53 +0000 (16:12 +0000)
committerJarkko Hietaniemi <jhi@iki.fi>
Wed, 3 Oct 2001 16:12:53 +0000 (16:12 +0000)
(The Unicode standard uses L& quite often.)

p4raw-id: //depot/perl@12319

lib/utf8_heavy.pl

index 025a70b..0961509 100644 (file)
@@ -41,13 +41,14 @@ sub SWASHNEW {
            }
        }
 
-       # This is separate from 'To' in preparation of Is.pl (a la In.pl).
-       if ((not defined $file) && $type =~ /^Is([A-Z][A-Za-z]*)$/) {
-           $file = "unicore/Is/$1";
-       }
-
-       if ((not defined $file) && $type =~ /^To([A-Z][A-Za-z]*)$/) {
-           $file = "unicore/To/$1";
+       unless (defined $file) {
+           # This is separate from 'To' in preparation of Is.pl (a la In.pl).
+           if ($type =~ /^Is([A-Z][A-Za-z]*|L&)$/) {
+               my $cat = $1 eq 'L&' ? 'L' : $1;
+               $file = "unicore/Is/$cat";
+           } elsif ((not defined $file) && $type =~ /^To([A-Z][A-Za-z]*)$/) {
+               $file = "unicore/To/$1";
+           }
        }
     }