summaryrefslogtreecommitdiff
path: root/lib/utf8_heavy.pl
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2001-10-03 16:12:53 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2001-10-03 16:12:53 +0000
commitdee4fd60ac48abef5b51dded36ba5990e53c7daf (patch)
tree45cf4c4e7aa95107fc6a302206aaf165b7fa6f0a /lib/utf8_heavy.pl
parentc602af677d8c7bd977ba491d5b450211d4807d32 (diff)
downloadperl-dee4fd60ac48abef5b51dded36ba5990e53c7daf.tar.gz
Unicode properties: support \p{(?:Is)?L&} as an alias for \pL.
(The Unicode standard uses L& quite often.) p4raw-id: //depot/perl@12319
Diffstat (limited to 'lib/utf8_heavy.pl')
-rw-r--r--lib/utf8_heavy.pl15
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/utf8_heavy.pl b/lib/utf8_heavy.pl
index 025a70bd12..0961509af8 100644
--- a/lib/utf8_heavy.pl
+++ b/lib/utf8_heavy.pl
@@ -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";
+ }
}
}