From: Shawn M Moore Date: Sat, 28 Mar 2009 19:54:20 +0000 (-0400) Subject: Make class_of actually work, since it's not a method! :x X-Git-Tag: 0.80~19 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=610df02ba7747957c7075018d72b13b0e642d71d;p=gitmo%2FClass-MOP.git Make class_of actually work, since it's not a method! :x --- diff --git a/lib/Class/MOP.pm b/lib/Class/MOP.pm index e99cc24..97e326c 100644 --- a/lib/Class/MOP.pm +++ b/lib/Class/MOP.pm @@ -137,13 +137,9 @@ sub _is_valid_class_name { } sub class_of { - my $self = shift; - my $class = shift; + my $class = blessed($_[0]) || $_[0]; return undef if !defined($class); - - $class = blessed($class) || $class; - return get_metaclass_by_name($class); }