Version 1.05
[gitmo/Moose.git] / lib / Moose / Meta / Attribute / Native / MethodProvider / Code.pm
CommitLineData
952b939d 1package Moose::Meta::Attribute::Native::MethodProvider::Code;
cdf3cae6 2use Moose::Role;
3
e462f6f3 4our $VERSION = '1.05';
cdf3cae6 5$VERSION = eval $VERSION;
6our $AUTHORITY = 'cpan:STEVAN';
7
8sub execute : method {
d9299060 9 my ($attr, $reader, $writer) = @_;
10 return sub {
11 my ($self, @args) = @_;
12 $reader->($self)->(@args);
13 };
14}
15
16sub execute_method : method {
17 my ($attr, $reader, $writer) = @_;
18 return sub {
19 my ($self, @args) = @_;
20 $reader->($self)->($self, @args);
21 };
cdf3cae6 22}
23
24no Moose::Role;
25
261;
e8953f86 27
28__END__
29
30=pod
31
32=head1 NAME
33
8b09d5c3 34Moose::Meta::Attribute::Native::MethodProvider::Code - role providing method generators for Code trait
e8953f86 35
36=head1 DESCRIPTION
37
38This is a role which provides the method generators for
39L<Moose::Meta::Attribute::Native::Trait::Code>. Please check there for
40documentation on what methods are provided.
41
42=head1 METHODS
43
44=over 4
45
46=item B<meta>
47
48=back
49
50=head1 BUGS
51
d4048ef3 52See L<Moose/BUGS> for details on reporting bugs.
e8953f86 53
54=head1 AUTHOR
55
56 Florian Ragwitz <rafl@debian.org>
57
58=head1 COPYRIGHT AND LICENSE
59
60Copyright 2007-2009 by Infinity Interactive, Inc.
61
62L<http://www.iinteractive.com>
63
64This library is free software; you can redistribute it and/or modify
65it under the same terms as Perl itself.
66
67=cut