X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMoose%2FMeta%2FAttribute%2FNative%2FTrait%2FNumber.pm;h=9bc53720299720b213f630b81c4aecddc4d210f0;hb=3eb89f709f04907580b508f821d6be2316fcb65f;hp=8ae4a341b6094d51b4bdadb1b7b26b3ee3d4fb29;hpb=157e0475594f2c7d9316491578a38a3b018de3e7;p=gitmo%2FMoose.git diff --git a/lib/Moose/Meta/Attribute/Native/Trait/Number.pm b/lib/Moose/Meta/Attribute/Native/Trait/Number.pm index 8ae4a34..9bc5372 100644 --- a/lib/Moose/Meta/Attribute/Native/Trait/Number.pm +++ b/lib/Moose/Meta/Attribute/Native/Trait/Number.pm @@ -1,7 +1,7 @@ package Moose::Meta::Attribute::Native::Trait::Number; use Moose::Role; -our $VERSION = '0.89'; +our $VERSION = '1.01'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; @@ -58,7 +58,7 @@ no Moose::Role; =head1 NAME -Moose::Meta::Attribute::Native::Trait::Number +Moose::Meta::Attribute::Native::Trait::Number - Helper trait for Num attributes =head1 SYNOPSIS @@ -66,11 +66,11 @@ Moose::Meta::Attribute::Native::Trait::Number use Moose; has 'integer' => ( - metaclass => 'Number', + traits => ['Number'], is => 'ro', - isa => 'Int', + isa => 'Num', default => 5, - handles => { + handles => { set => 'set', add => 'add', sub => 'sub', @@ -78,7 +78,7 @@ Moose::Meta::Attribute::Native::Trait::Number div => 'div', mod => 'mod', abs => 'abs', - } + }, ); my $real = Real->new(); @@ -108,19 +108,19 @@ Adds the current value of the attribute to C<$value>. =item B -Subtracts the current value of the attribute to C<$value>. +Subtracts C<$value> from the current value of the attribute. =item B -Multiplies the current value of the attribute to C<$value>. +Multiplies the current value of the attribute by C<$value>. =item B -Divides the current value of the attribute to C<$value>. +Divides the current value of the attribute by C<$value>. =item B -Modulus the current value of the attribute to C<$value>. +Returns the current value of the attribute modulo C<$value>. =item B @@ -140,9 +140,7 @@ Sets the current value of the attribute to its absolute value. =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 for details on reporting bugs. =head1 AUTHOR