From 1db90d01e8aabb80a38c139443949a3c880b6be4 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Tue, 19 Jan 2010 23:49:56 -0600 Subject: with_caller -> with_meta --- lib/MooseX/Mangle.pm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/lib/MooseX/Mangle.pm b/lib/MooseX/Mangle.pm index b71805f..51531e6 100644 --- a/lib/MooseX/Mangle.pm +++ b/lib/MooseX/Mangle.pm @@ -57,9 +57,8 @@ actually pass to the method. =cut sub mangle_args { - my $caller = shift; + my $meta = shift; my ($method_name, $code) = @_; - my $meta = Class::MOP::class_of($caller); $meta->add_around_method_modifier($method_name => sub { my $orig = shift; my $self = shift; @@ -78,9 +77,8 @@ return. =cut sub mangle_return { - my $caller = shift; + my $meta = shift; my ($method_name, $code) = @_; - my $meta = Class::MOP::class_of($caller); $meta->add_around_method_modifier($method_name => sub { my $orig = shift; my $self = shift; @@ -105,9 +103,8 @@ undef is returned without the original method being called at all. =cut sub guard { - my $caller = shift; + my $meta = shift; my ($method_name, $code) = @_; - my $meta = Class::MOP::class_of($caller); $meta->add_around_method_modifier($method_name => sub { my $orig = shift; my $self = shift; @@ -119,7 +116,7 @@ sub guard { } Moose::Exporter->setup_import_methods( - with_caller => [qw(mangle_args mangle_return guard)], + with_meta => [qw(mangle_args mangle_return guard)], ); =head1 BUGS -- cgit v1.2.3-54-g00ecf