2 package MooseX::AttributeHelpers::MethodProvider::Counter;
6 our $AUTHORITY = 'cpan:STEVAN';
9 my ($attr, $reader, $writer) = @_;
10 return sub { $writer->($_[0], $attr->default($_[0])) };
14 my ($attr, $reader, $writer) = @_;
15 return sub { $writer->($_[0], $reader->($_[0]) + 1) };
19 my ($attr, $reader, $writer) = @_;
20 return sub { $writer->($_[0], $reader->($_[0]) - 1) };
31 MooseX::AttributeHelpers::MethodProvider::Counter
35 This is a role which provides the method generators for
36 L<MooseX::AttributeHelpers::Counter>.
46 =head1 PROVIDED METHODS
60 All complex software has bugs lurking in it, and this module is no
61 exception. If you find a bug please either email me, or add the bug
66 Stevan Little E<lt>stevan@iinteractive.comE<gt>
68 =head1 COPYRIGHT AND LICENSE
70 Copyright 2007 by Infinity Interactive, Inc.
72 L<http://www.iinteractive.com>
74 This library is free software; you can redistribute it and/or modify
75 it under the same terms as Perl itself.