From: Jarkko Hietaniemi Date: Tue, 15 Jan 2002 13:51:11 +0000 (+0000) Subject: Additional utf8_heavy.pl tweak from Jeffrey. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=03138300d2ba00b7ff75af983974ea0770374802;p=p5sagit%2Fp5-mst-13.2.git Additional utf8_heavy.pl tweak from Jeffrey. p4raw-id: //depot/perl@14272 --- diff --git a/lib/utf8_heavy.pl b/lib/utf8_heavy.pl index e82c06b..3f14afe 100644 --- a/lib/utf8_heavy.pl +++ b/lib/utf8_heavy.pl @@ -97,9 +97,9 @@ sub SWASHNEW { ## If so, the associated name is the file we need. ## my $prefix = substr(lc($istype), 0, 2); - if (exists $utf8::IsPat{$prefix}) + if (my $hashref = $utf8::IsPat{$prefix}) { - while (my ($pat, $name) = each %{$utf8::IsPat{$prefix}}) + while (my ($pat, $name) = each %{$hashref}) { print "isprefix = $prefix, Is = $istype, pat = $pat\n" if DEBUG; ## @@ -113,6 +113,7 @@ sub SWASHNEW { if ($istype =~ /^$pat$/i) { $file = "unicore/Is/$name.pl"; + keys %{$hashref}; ## reset the 'each' above last GETFILE; } } @@ -148,16 +149,22 @@ sub SWASHNEW { last GETFILE; } + ## + ## Need to look at %utf8::InPat (loaded from "unicore/In.pl") + ## to see if there's a regex that matches this $intype. + ## If so, the associated name is the file we need. + ## my $prefix = substr(lc($intype), 0, 2); - if (exists $utf8::InPat{$prefix}) + if (my $hashref = $utf8::InPat{$prefix}) { print "inprefix = $prefix, In = $intype\n" if DEBUG; - while (my ($pat, $name) = each %{$utf8::InPat{$prefix}}) + while (my ($pat, $name) = each %{$hashref}) { print "inprefix = $prefix, In = $intype, k = $pat\n" if DEBUG; if ($intype =~ /^$pat$/i) { $file = "unicore/In/$name.pl"; print "inprefix = $prefix, In = $intype, k = $pat, file = $file\n" if DEBUG; + keys %{$hashref}; ## reset the 'each' above last GETFILE; } }