No need to write "0+$self" when we already overloaded numification
Dave Rolsky [Sun, 30 May 2010 15:20:55 +0000 (10:20 -0500)]
lib/Moose/Meta/TypeConstraint.pm

index d292bcc..3dd284a 100644 (file)
@@ -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;