From: gfx Date: Thu, 25 Mar 2010 01:42:35 +0000 (+0900) Subject: Remove the cache of load_class() X-Git-Tag: 0.52~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=be0ba85990e3ad1ea9fb6ae6401cc115541dfd59;p=gitmo%2FMouse.git Remove the cache of load_class() --- diff --git a/lib/Mouse/Util.pm b/lib/Mouse/Util.pm index d3057ce..f0e551f 100644 --- a/lib/Mouse/Util.pm +++ b/lib/Mouse/Util.pm @@ -244,7 +244,6 @@ sub load_first_existing_class { } # taken from Class/MOP.pm -my %is_class_loaded_cache; sub _try_load_one_class { my $class = shift; @@ -253,7 +252,7 @@ sub _try_load_one_class { Carp::confess "Invalid class name ($display)"; } - return undef if $is_class_loaded_cache{$class} ||= is_class_loaded($class); + return '' if is_class_loaded($class); $class =~ s{::}{/}g; $class .= '.pm';