From: Tokuhiro Matsuno Date: Sat, 11 Apr 2009 15:44:24 +0000 (+0900) Subject: tckect #42992: Method modifiers affect all classes in the whole inheritance tree X-Git-Tag: 0.21~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=commitdiff_plain;h=e82cf08d6ab36c4269c82cb2e066defee22a26d8 tckect #42992: Method modifiers affect all classes in the whole inheritance tree was resolved by patch from gfx++ --- diff --git a/lib/Mouse/Meta/Role.pm b/lib/Mouse/Meta/Role.pm index 5dccbdc..709c3f9 100644 --- a/lib/Mouse/Meta/Role.pm +++ b/lib/Mouse/Meta/Role.pm @@ -101,7 +101,7 @@ sub apply { # XXX what's Moose's behavior? #next; } else { - *$class_function = *$role_function; + *{$class_function} = \&{$role_function}; } if ($args{alias} && $args{alias}->{$name}) { my $dstname = $args{alias}->{$name}; diff --git a/t/000-recipes/002_schwartz_tutorial.t b/t/000-recipes/002_schwartz_tutorial.t index c23715e..c15003e 100755 --- a/t/000-recipes/002_schwartz_tutorial.t +++ b/t/000-recipes/002_schwartz_tutorial.t @@ -125,7 +125,6 @@ is stdout, "Mr. Ed\n"; $talking->color("grey"); # sets the color $talking->speak; # says "Mr. Ed goes neigh" -TODO: { local $TODO = "this currently fails because of a bug in Class::Method::Modifiers (see RT #42992)"; is stdout, <speak; # prints "Baab goes baaaah" is stdout, <new(name => 'Mickey');