From: Arthur Axel 'fREW' Schmidt Date: Wed, 4 Jul 2012 20:47:01 +0000 (-0500) Subject: runtime applied roles include roles from original class in new class X-Git-Tag: v1.001004~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0f50fbc6044ec75959b2ba00372738a5d0920b21;p=gitmo%2FRole-Tiny.git runtime applied roles include roles from original class in new class --- diff --git a/Changes b/Changes index 56fd809..80f97e1 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,6 @@ + - when applying runtime roles include roles from original class in new class + ( fixes ::does_role checks) + 1.001003 - 2012-06-19 - correctly apply modifiers with role composition - check for conflicts during role-to-object application (test from mmcleric) diff --git a/lib/Role/Tiny.pm b/lib/Role/Tiny.pm index 3a040fd..16e2b87 100644 --- a/lib/Role/Tiny.pm +++ b/lib/Role/Tiny.pm @@ -159,7 +159,7 @@ sub create_class_with_roles { *{_getglob "${new_name}::does"} = \&does_role unless $new_name->can('does'); @{$APPLIED_TO{$new_name}||={}}{ - map keys %{$APPLIED_TO{$_}}, @roles + map keys %{$APPLIED_TO{$_}}, @roles, $superclass } = (); $COMPOSED{class}{$new_name} = 1;