From: Shawn M Moore Date: Sat, 28 Mar 2009 20:24:55 +0000 (-0400) Subject: Use class_of for roles X-Git-Tag: 0.73_01~36^2~31 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=91e6653b2e00ac9a1960368c5fa71936d8111b01;p=gitmo%2FMoose.git Use class_of for roles --- diff --git a/lib/Moose/Meta/Attribute.pm b/lib/Moose/Meta/Attribute.pm index 7d0f9c6..50079d4 100644 --- a/lib/Moose/Meta/Attribute.pm +++ b/lib/Moose/Meta/Attribute.pm @@ -644,9 +644,7 @@ sub _find_delegate_metaclass { return Moose::Meta::Class->initialize($class); } elsif (my $role = $self->_does_metadata) { - # our role will always have - # a meta method - return $role->meta; + return Class::MOP::class_of($role); } else { $self->throw_error("Cannot find delegate metaclass for attribute " . $self->name);