From: Shawn M Moore Date: Sat, 28 Mar 2009 20:23:03 +0000 (-0400) Subject: initialize will return the metaclass if it's there, no need to call meta X-Git-Tag: 0.73_01~36^2~32 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9031e2c4a5f2edc1a0a46cd137ea7ebb4d4ba309;p=gitmo%2FMoose.git initialize will return the metaclass if it's there, no need to call meta --- diff --git a/lib/Moose/Meta/Attribute.pm b/lib/Moose/Meta/Attribute.pm index 96dc22b..7d0f9c6 100644 --- a/lib/Moose/Meta/Attribute.pm +++ b/lib/Moose/Meta/Attribute.pm @@ -638,13 +638,9 @@ sub _canonicalize_handles { sub _find_delegate_metaclass { my $self = shift; if (my $class = $self->_isa_metadata) { - # if the class does have - # a meta method, use it - return $class->meta if $class->can('meta'); - # otherwise we might be - # dealing with a non-Moose - # class, and need to make - # our own metaclass + # we might be dealing with a non-Moose class, + # and need to make our own metaclass. if there's + # already a metaclass, it will be returned return Moose::Meta::Class->initialize($class); } elsif (my $role = $self->_does_metadata) {