X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FMOP%2FMethod%2FWrapped.pm;h=32f22ea5e7204f32e78ed784fbcb62e8efb62a1a;hb=d3778286d87889f0dcfaf0cc7f7659862eb2798d;hp=167d71f369e752180ca1b6b2040d890112350482;hpb=8683db0e09d4b53db67d19f36810e4070e264d2d;p=gitmo%2FClass-MOP.git diff --git a/lib/Class/MOP/Method/Wrapped.pm b/lib/Class/MOP/Method/Wrapped.pm index 167d71f..32f22ea 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.65'; +our $VERSION = '0.78'; +$VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; use base 'Class::MOP::Method'; @@ -107,6 +108,11 @@ sub add_before_modifier { $_build_wrapped_method->($code->{'modifier_table'}); } +sub before_modifiers { + my $code = shift; + return @{$code->{'modifier_table'}->{before}}; +} + sub add_after_modifier { my $code = shift; my $modifier = shift; @@ -114,6 +120,11 @@ sub add_after_modifier { $_build_wrapped_method->($code->{'modifier_table'}); } +sub after_modifiers { + my $code = shift; + return @{$code->{'modifier_table'}->{after}}; +} + { # NOTE: # this is another possible candidate for @@ -141,6 +152,11 @@ sub add_after_modifier { } } +sub around_modifiers { + my $code = shift; + return @{$code->{'modifier_table'}->{around}->{methods}}; +} + 1; __END__ @@ -190,13 +206,26 @@ see the section in L. =back +These three methods each returna list of method modifiers I. + +=over 4 + +=item B + +=item B + +=item B + +=back + =head1 AUTHORS Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006-2008 by Infinity Interactive, Inc. +Copyright 2006-2009 by Infinity Interactive, Inc. L