X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FAttribute%2FNative%2FMethodProvider%2FCode.pm;h=03c22b6d7e8d95a02730f7c01bcdeef75b56f006;hb=8b09d5c3b7d7e44b2feb8b9485d8423c58b09b16;hp=79751a5e11e15d70b2e59c21aa6b8687b414e5f2;hpb=96b4859e58ffe4fa332fbc96b5c1d57ec50745e3;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Attribute/Native/MethodProvider/Code.pm b/lib/Moose/Meta/Attribute/Native/MethodProvider/Code.pm index 79751a5..03c22b6 100644 --- a/lib/Moose/Meta/Attribute/Native/MethodProvider/Code.pm +++ b/lib/Moose/Meta/Attribute/Native/MethodProvider/Code.pm @@ -1,13 +1,24 @@ package Moose::Meta::Attribute::Native::MethodProvider::Code; use Moose::Role; -our $VERSION = '0.89_02'; +our $VERSION = '0.95'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; sub execute : method { - my ( $attr, $reader, $writer ) = @_; - return sub { $reader->(@_)->(@_) }; + my ($attr, $reader, $writer) = @_; + return sub { + my ($self, @args) = @_; + $reader->($self)->(@args); + }; +} + +sub execute_method : method { + my ($attr, $reader, $writer) = @_; + return sub { + my ($self, @args) = @_; + $reader->($self)->($self, @args); + }; } no Moose::Role; @@ -20,7 +31,7 @@ __END__ =head1 NAME -Moose::Meta::Attribute::Native::MethodProvider::Code +Moose::Meta::Attribute::Native::MethodProvider::Code - role providing method generators for Code trait =head1 DESCRIPTION @@ -38,9 +49,7 @@ documentation on what methods are provided. =head1 BUGS -All complex software has bugs lurking in it, and this module is no -exception. If you find a bug please either email me, or add the bug -to cpan-RT. +See L for details on reporting bugs. =head1 AUTHOR