From: Shawn M Moore Date: Tue, 25 Nov 2008 07:36:15 +0000 (+0000) Subject: Use the same _is_valid_class_name check in is_class_loaded X-Git-Tag: 0.71~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bd5672fb8653d1dfee01cb1b11f7c3525fb9fdcd;p=gitmo%2FClass-MOP.git Use the same _is_valid_class_name check in is_class_loaded --- diff --git a/lib/Class/MOP.pm b/lib/Class/MOP.pm index 43e5192..a72de08 100644 --- a/lib/Class/MOP.pm +++ b/lib/Class/MOP.pm @@ -173,7 +173,7 @@ sub _is_valid_class_name { sub is_class_loaded { my $class = shift; - return 0 if ref($class) || !defined($class) || !length($class); + return 0 unless _is_valid_class_name($class); # walk the symbol table tree to avoid autovififying # \*{${main::}{"Foo::"}} == \*main::Foo::