From c49d5ed730376407060cbf826eab2369ab99bf61 Mon Sep 17 00:00:00 2001
From: Jonathan Steinert <unknown>
Date: Mon, 30 Apr 2007 22:18:52 -0700
Subject: [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
---
 lib/utf8_heavy.pl | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

(limited to 'lib')

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 $@;
-- 
cgit v1.2.1