Version 1.04
[gitmo/Moose.git] / lib / Moose / Meta / Attribute / Native / Trait / Number.pm
index 8589ca6..6cf9d4a 100644 (file)
@@ -1,7 +1,7 @@
 package Moose::Meta::Attribute::Native::Trait::Number;
 use Moose::Role;
 
-our $VERSION   = '0.87';
+our $VERSION   = '1.04';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -58,20 +58,19 @@ no Moose::Role;
 
 =head1 NAME
 
-Moose::Meta::Attribute::Native::Trait::Number
+Moose::Meta::Attribute::Native::Trait::Number - Helper trait for Num attributes
 
 =head1 SYNOPSIS
 
   package Real;
   use Moose;
-  use Moose::AttributeHelpers;
 
   has 'integer' => (
-      metaclass => 'Number',
+      traits    => ['Number'],
       is        => 'ro',
-      isa       => 'Int',
+      isa       => 'Num',
       default   => 5,
-      handles  => {
+      handles   => {
           set => 'set',
           add => 'add',
           sub => 'sub',
@@ -79,7 +78,7 @@ Moose::Meta::Attribute::Native::Trait::Number
           div => 'div',
           mod => 'mod',
           abs => 'abs',
-      }
+      },
   );
 
   my $real = Real->new();
@@ -99,31 +98,31 @@ package.
 
 =over 4
 
-=item I<set ($value)>
+=item B<set($value)>
 
 Alternate way to set the value.
 
-=item I<add ($value)>
+=item B<add($value)>
 
 Adds the current value of the attribute to C<$value>.
 
-=item I<sub ($value)>
+=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 I<mul ($value)>
+=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 I<div ($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 I<mod ($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 I<abs>
+=item B<abs>
 
 Sets the current value of the attribute to its absolute value.
 
@@ -141,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<Moose/BUGS> for details on reporting bugs.
 
 =head1 AUTHOR