From: Fuji, Goro Date: Wed, 29 Sep 2010 04:10:39 +0000 (+0900) Subject: Tweaks X-Git-Tag: 0.77~6 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=3d27a7b791d542856ce729236794338634ae39be;p=gitmo%2FMouse.git Tweaks --- diff --git a/lib/Mouse/Meta/Class.pm b/lib/Mouse/Meta/Class.pm index 27a48db..717f025 100644 --- a/lib/Mouse/Meta/Class.pm +++ b/lib/Mouse/Meta/Class.pm @@ -413,8 +413,7 @@ sub add_override_method_modifier { local $Mouse::SUPER_PACKAGE = $package; local $Mouse::SUPER_BODY = $super_body; local @Mouse::SUPER_ARGS = @_; - - $code->(@_); + &{$code}; }); return; } @@ -431,10 +430,10 @@ sub add_augment_method_modifier { my $super_package = $super->package_name; my $super_body = $super->body; - $self->add_method($name => sub{ + $self->add_method($name => sub { local $Mouse::INNER_BODY{$super_package} = $code; local $Mouse::INNER_ARGS{$super_package} = [@_]; - $super_body->(@_); + &{$super_body}; }); return; }