1 package MooseX::AttributeHelpers::Number;
3 use MooseX::AttributeHelpers::MethodProvider::Number;
5 extends 'MooseX::AttributeHelpers::Base';
8 our $AUTHORITY = 'cpan:STEVAN';
11 method_provider => 'Number',
25 MooseX::AttributeHelpers::Number
31 use MooseX::AttributeHelpers;
34 metaclass => 'Number',
49 my $real = Real->new();
50 $real->add(5); # same as $real->integer($real->integer + 5);
51 $real->sub(2); # same as $real->integer($real->integer - 2);
55 This provides a simple numeric attribute, which supports most of the
56 basic math operations. It is important to note that all operations modify the
57 value of the attribute in place.
59 =head1 METHOD PROVIDER
61 The methods for this metaclass are provided by
62 L<MooseX::AttributeHelpers::MethodProvider::Number>.
66 All complex software has bugs lurking in it, and this module is no
67 exception. If you find a bug please either email me, or add the bug
74 =head1 COPYRIGHT AND LICENSE
76 Copyright 2007-2008 by Infinity Interactive, Inc.
78 L<http://www.iinteractive.com>
80 This library is free software; you can redistribute it and/or modify
81 it under the same terms as Perl itself.