Use get_method_body(), instead of can()
gfx [Sat, 24 Oct 2009 04:33:13 +0000 (13:33 +0900)]
lib/Mouse/Meta/Module.pm

index 690e7c7..6c3abf6 100755 (executable)
@@ -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,
         );
     }