Don't protect against undef both because this is a hot function and
Shawn M Moore [Sat, 28 Mar 2009 22:13:38 +0000 (18:13 -0400)]
because the user shouldn't pass undef to this :)

lib/Class/MOP.pm

index e0cb97a..e1c4579 100644 (file)
@@ -138,8 +138,6 @@ sub _is_valid_class_name {
 
 sub class_of {
     my $class = blessed($_[0]) || $_[0];
-
-    return undef if !defined($class);
     return get_metaclass_by_name($class);
 }