From: Matt S Trout Date: Wed, 11 Apr 2012 20:42:06 +0000 (+0000) Subject: adjust for latest Role::Tiny X-Git-Tag: v0.009_015~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6893ea3022eb12f1a1927093a48e1c1e40818081;p=gitmo%2FMoo.git adjust for latest Role::Tiny --- diff --git a/Makefile.PL b/Makefile.PL index b1dc535..5a45ec3 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -13,7 +13,7 @@ my %RUN_DEPS = ( 'Class::Method::Modifiers' => 1.07, 'strictures' => 1.001001, 'Module::Runtime' => 0.013, - 'Role::Tiny' => 1.000000, + 'Role::Tiny' => 1.000900, ); # have to do this since old EUMM dev releases miss the eval $VERSION line diff --git a/lib/Moo.pm b/lib/Moo.pm index eeee9e9..1ccc972 100644 --- a/lib/Moo.pm +++ b/lib/Moo.pm @@ -33,8 +33,7 @@ sub import { }; *{_getglob("${target}::with")} = sub { require Moo::Role; - die "Only one role supported at a time by with" if @_ > 1; - Moo::Role->apply_role_to_package($target, $_[0]); + Moo::Role->apply_roles_to_package($target, $_[0]); }; $MAKERS{$target} = {}; *{_getglob("${target}::has")} = sub { diff --git a/lib/Moo/Role.pm b/lib/Moo/Role.pm index e55836d..66a9948 100644 --- a/lib/Moo/Role.pm +++ b/lib/Moo/Role.pm @@ -73,11 +73,11 @@ sub _make_accessors_if_moose { } } -sub apply_role_to_package { +sub apply_single_role_to_package { my ($me, $to, $role) = @_; $me->_inhale_if_moose($role); $me->_make_accessors_if_moose($role, $to); - $me->SUPER::apply_role_to_package($to, $role); + $me->SUPER::apply_single_role_to_package($to, $role); $me->_handle_constructor($to, $INFO{$role}{attributes}); }