summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorJonathan Steinert <unknown>2007-04-30 22:18:52 -0700
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-05-02 15:32:38 +0000
commitc49d5ed730376407060cbf826eab2369ab99bf61 (patch)
tree3c6885ea001f4cbfa4c0bc185bae96b6cb60c5fd /lib
parent9f61653ad1a5a0e664e7c27edd6c232deb0bf787 (diff)
downloadperl-c49d5ed730376407060cbf826eab2369ab99bf61.tar.gz
[perl #42839] Swatch hash cache has key mismatch
From: Jonathan Steinert (via RT) <perlbug-followup@perl.org> Message-ID: <rt-3.6.HEAD-30557-1178021932-1416.42839-75-0@perl.org> p4raw-id: //depot/perl@31119
Diffstat (limited to 'lib')
-rw-r--r--lib/utf8_heavy.pl7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/utf8_heavy.pl b/lib/utf8_heavy.pl
index 8a2ba71066..c7bf527b1f 100644
--- a/lib/utf8_heavy.pl
+++ b/lib/utf8_heavy.pl
@@ -187,11 +187,12 @@ sub SWASHNEW {
## (exception: user-defined properties and mappings), so we
## have a filename, so now we load it if we haven't already.
## If we have, return the cached results. The cache key is the
- ## file to load.
+ ## class and file to load.
##
- if ($Cache{$file} and ref($Cache{$file}) eq $class) {
+ my $found = $Cache{$class, $file};
+ if ($found and ref($found) eq $class) {
print STDERR "Returning cached '$file' for \\p{$type}\n" if DEBUG;
- return $Cache{$class, $file};
+ return $found;
}
$list = do $file; die $@ if $@;