X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FMOP%2FMethod%2FWrapped.pm;h=c3a76b79b3c3a87648e16a99727ad18837ff7e9c;hb=2a755fe899a935b972c69fddcec98e565ed97177;hp=149d9a701b8a685a37eafd66e9929e23c43179f7;hpb=6e1c8b63d87c6e1d8e84e15cc2c1f5336780515b;p=gitmo%2FClass-MOP.git diff --git a/lib/Class/MOP/Method/Wrapped.pm b/lib/Class/MOP/Method/Wrapped.pm index 149d9a7..c3a76b7 100644 --- a/lib/Class/MOP/Method/Wrapped.pm +++ b/lib/Class/MOP/Method/Wrapped.pm @@ -7,7 +7,8 @@ use warnings; use Carp 'confess'; use Scalar::Util 'blessed'; -our $VERSION = '0.63'; +our $VERSION = '0.64_05'; +$VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; use base 'Class::MOP::Method'; @@ -91,27 +92,27 @@ sub wrap { package_name => $params{package_name} || $code->package_name, name => $params{name} || $code->name, ); - $method->{'%!modifier_table'} = $modifier_table; + $method->{'modifier_table'} = $modifier_table; $method; } sub get_original_method { my $code = shift; - $code->{'%!modifier_table'}->{orig}; + $code->{'modifier_table'}->{orig}; } sub add_before_modifier { my $code = shift; my $modifier = shift; - unshift @{$code->{'%!modifier_table'}->{before}} => $modifier; - $_build_wrapped_method->($code->{'%!modifier_table'}); + unshift @{$code->{'modifier_table'}->{before}} => $modifier; + $_build_wrapped_method->($code->{'modifier_table'}); } sub add_after_modifier { my $code = shift; my $modifier = shift; - push @{$code->{'%!modifier_table'}->{after}} => $modifier; - $_build_wrapped_method->($code->{'%!modifier_table'}); + push @{$code->{'modifier_table'}->{after}} => $modifier; + $_build_wrapped_method->($code->{'modifier_table'}); } { @@ -132,12 +133,12 @@ sub add_after_modifier { sub add_around_modifier { my $code = shift; my $modifier = shift; - unshift @{$code->{'%!modifier_table'}->{around}->{methods}} => $modifier; - $code->{'%!modifier_table'}->{around}->{cache} = $compile_around_method->( - @{$code->{'%!modifier_table'}->{around}->{methods}}, - $code->{'%!modifier_table'}->{orig}->body + unshift @{$code->{'modifier_table'}->{around}->{methods}} => $modifier; + $code->{'modifier_table'}->{around}->{cache} = $compile_around_method->( + @{$code->{'modifier_table'}->{around}->{methods}}, + $code->{'modifier_table'}->{orig}->body ); - $_build_wrapped_method->($code->{'%!modifier_table'}); + $_build_wrapped_method->($code->{'modifier_table'}); } }