From: Dave Rolsky Date: Sun, 30 May 2010 15:20:55 +0000 (-0500) Subject: No need to write "0+$self" when we already overloaded numification X-Git-Tag: 1.06~1^2~2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=0677975f6de75cfd1b9078d2ced7395f0fd2cc9d;p=gitmo%2FMoose.git No need to write "0+$self" when we already overloaded numification --- diff --git a/lib/Moose/Meta/TypeConstraint.pm b/lib/Moose/Meta/TypeConstraint.pm index d292bcc..3dd284a 100644 --- a/lib/Moose/Meta/TypeConstraint.pm +++ b/lib/Moose/Meta/TypeConstraint.pm @@ -134,7 +134,7 @@ sub equals { my $other = Moose::Util::TypeConstraints::find_type_constraint($type_or_name) or return; - return 1 if 0+$self == 0+$other; + return 1 if $self == $other; if ( $self->has_hand_optimized_type_constraint and $other->has_hand_optimized_type_constraint ) { return 1 if $self->hand_optimized_type_constraint == $other->hand_optimized_type_constraint;