projects
/
gitmo/Moose.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
handle caching of anon classes better, when role/class params are used
[gitmo/Moose.git]
/
lib
/
Class
/
MOP
/
Package.pm
diff --git
a/lib/Class/MOP/Package.pm
b/lib/Class/MOP/Package.pm
index
2aada01
..
cca1cb6
100644
(file)
--- a/
lib/Class/MOP/Package.pm
+++ b/
lib/Class/MOP/Package.pm
@@
-100,7
+100,10
@@
sub create {
my $cache_key;
if ($cache_ok) {
$cache_key = $class->_anon_cache_key(%options);
+ undef $cache_ok if !defined($cache_key);
+ }
+ if ($cache_ok) {
if (defined $ANON_PACKAGE_CACHE{$cache_key}) {
return $ANON_PACKAGE_CACHE{$cache_key};
}