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-Tag: accepted/trunk/20130322.191538~30023 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dee4fd60ac48abef5b51dded36ba5990e53c7daf;p=platform%2Fupstream%2Fperl.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"; + } } }