package Moose::Meta::Attribute::Native::Trait::Number;
use Moose::Role;
-our $VERSION = '0.89';
+our $VERSION = '0.93';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
=head1 NAME
-Moose::Meta::Attribute::Native::Trait::Number
+Moose::Meta::Attribute::Native::Trait::Number - Helper trait for Num attributes
=head1 SYNOPSIS
use Moose;
has 'integer' => (
- metaclass => 'Number',
+ traits => ['Number'],
is => 'ro',
- isa => 'Int',
+ isa => 'Num',
default => 5,
handles => {
set => 'set',
=item B<sub($value)>
-Subtracts the current value of the attribute to C<$value>.
+Subtracts C<$value> from the current value of the attribute.
=item B<mul($value)>
-Multiplies the current value of the attribute to C<$value>.
+Multiplies the current value of the attribute by C<$value>.
=item B<div($value)>
-Divides the current value of the attribute to C<$value>.
+Divides the current value of the attribute by C<$value>.
=item B<mod($value)>
-Modulus the current value of the attribute to C<$value>.
+Returns the current value of the attribute modulo C<$value>.
=item B<abs>
=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<Moose/BUGS> for details on reporting bugs.
=head1 AUTHOR