diff options
author | Jesse Luehrs <doy@tozt.net> | 2010-01-19 23:49:56 -0600 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2010-01-19 23:49:56 -0600 |
commit | 1db90d01e8aabb80a38c139443949a3c880b6be4 (patch) | |
tree | c94cd66112748ed074e140e34e27465235d7d777 /lib/MooseX | |
parent | 0ad599eceef6bd68ca694eba8178efb6af411d49 (diff) | |
download | moosex-mangle-1db90d01e8aabb80a38c139443949a3c880b6be4.tar.gz moosex-mangle-1db90d01e8aabb80a38c139443949a3c880b6be4.zip |
with_caller -> with_meta
Diffstat (limited to 'lib/MooseX')
-rw-r--r-- | lib/MooseX/Mangle.pm | 11 |
1 files 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 |