From: Jarkko Hietaniemi Date: Wed, 3 Oct 2001 16:12:53 +0000 (+0000) Subject: Unicode properties: support \p{(?:Is)?L&} as an alias for \pL. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dee4fd60ac48abef5b51dded36ba5990e53c7daf;p=p5sagit%2Fp5-mst-13.2.git Unicode properties: support \p{(?:Is)?L&} as an alias for \pL. (The Unicode standard uses L& quite often.) p4raw-id: //depot/perl@12319 --- diff --git a/lib/utf8_heavy.pl b/lib/utf8_heavy.pl index 025a70b..0961509 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"; + } } }