From: Robert Boone Date: Tue, 22 May 2007 11:10:14 +0000 (+0000) Subject: No need for abs() in mod X-Git-Tag: 0.18_01~79 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8a6b3adde88036ee3ce2530103d884464f9e5e42;p=gitmo%2FMooseX-AttributeHelpers.git No need for abs() in mod --- diff --git a/lib/MooseX/AttributeHelpers/Number.pm b/lib/MooseX/AttributeHelpers/Number.pm index ee1ebbb..7b9b144 100644 --- a/lib/MooseX/AttributeHelpers/Number.pm +++ b/lib/MooseX/AttributeHelpers/Number.pm @@ -33,7 +33,7 @@ has '+method_constructors' => ( }, mod => sub { my $attr = shift; - return sub { $attr->set_value($_[0], abs($attr->get_value($_[0]) % $_[1])) }; + return sub { $attr->set_value($_[0], $attr->get_value($_[0]) % $_[1]) }; }, abs => sub { my $attr = shift;