Commit | Line | Data |
952b939d |
1 | package Moose::Meta::Attribute::Native::MethodProvider::Code; |
cdf3cae6 |
2 | use Moose::Role; |
3 | |
8b5074ce |
4 | our $VERSION = '0.97'; |
cdf3cae6 |
5 | $VERSION = eval $VERSION; |
6 | our $AUTHORITY = 'cpan:STEVAN'; |
7 | |
8 | sub execute : method { |
d9299060 |
9 | my ($attr, $reader, $writer) = @_; |
10 | return sub { |
11 | my ($self, @args) = @_; |
12 | $reader->($self)->(@args); |
13 | }; |
14 | } |
15 | |
16 | sub execute_method : method { |
17 | my ($attr, $reader, $writer) = @_; |
18 | return sub { |
19 | my ($self, @args) = @_; |
20 | $reader->($self)->($self, @args); |
21 | }; |
cdf3cae6 |
22 | } |
23 | |
24 | no Moose::Role; |
25 | |
26 | 1; |
e8953f86 |
27 | |
28 | __END__ |
29 | |
30 | =pod |
31 | |
32 | =head1 NAME |
33 | |
8b09d5c3 |
34 | Moose::Meta::Attribute::Native::MethodProvider::Code - role providing method generators for Code trait |
e8953f86 |
35 | |
36 | =head1 DESCRIPTION |
37 | |
38 | This is a role which provides the method generators for |
39 | L<Moose::Meta::Attribute::Native::Trait::Code>. Please check there for |
40 | documentation 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 |
52 | See 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 | |
60 | Copyright 2007-2009 by Infinity Interactive, Inc. |
61 | |
62 | L<http://www.iinteractive.com> |
63 | |
64 | This library is free software; you can redistribute it and/or modify |
65 | it under the same terms as Perl itself. |
66 | |
67 | =cut |