From: Graham Knop Date: Thu, 11 Jul 2013 01:40:18 +0000 (-0400) Subject: check if it is a role after inhaling from Moose X-Git-Tag: v1.003000~16 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMoo.git;a=commitdiff_plain;h=8420a97e8e0883f806b0f736d097348588a6626a check if it is a role after inhaling from Moose --- diff --git a/lib/Moo/Role.pm b/lib/Moo/Role.pm index 5643413..96315b7 100644 --- a/lib/Moo/Role.pm +++ b/lib/Moo/Role.pm @@ -216,8 +216,8 @@ sub apply_roles_to_package { sub apply_single_role_to_package { my ($me, $to, $role) = @_; - die "${role} is not a Moo::Role" unless my $info = $INFO{$role}; $me->_inhale_if_moose($role); + die "${role} is not a Moo::Role" unless my $info = $INFO{$role}; $me->_handle_constructor($to, $INFO{$role}{attributes}); $me->_maybe_make_accessors($role, $to); $me->SUPER::apply_single_role_to_package($to, $role);