From: gfx Date: Sat, 24 Oct 2009 04:33:13 +0000 (+0900) Subject: Use get_method_body(), instead of can() X-Git-Tag: 0.40_01~37 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=60e446e83f3334422660673d3d568726f3cddf1f;p=gitmo%2FMouse.git Use get_method_body(), instead of can() --- diff --git a/lib/Mouse/Meta/Module.pm b/lib/Mouse/Meta/Module.pm index 690e7c7..6c3abf6 100755 --- a/lib/Mouse/Meta/Module.pm +++ b/lib/Mouse/Meta/Module.pm @@ -149,11 +149,10 @@ sub get_method{ my $method_metaclass = $self->method_metaclass; load_class($method_metaclass); - my $package = $self->name; return $method_metaclass->wrap( - body => $package->can($method_name), + body => $self->get_method_body($method_name), name => $method_name, - package => $package, + package => $self->name, associated_metaclass => $self, ); }