[PATCH] Work around a numification problem on ia64
Niko Tyni
ntyni at debian.org
Fri Aug 20 19:32:31 UTC 2010
As seen in <http://bugs.debian.org/588118>, the numeric comparison
seems to trigger a bug in perl 5.10.1 on the ia64 architecture.
Explicitly numifying before comparing seems to work around this.
---
lib/Moose/Meta/TypeConstraint.pm | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/lib/Moose/Meta/TypeConstraint.pm b/lib/Moose/Meta/TypeConstraint.pm
index 1c8f3de..700f77f 100644
--- a/lib/Moose/Meta/TypeConstraint.pm
+++ b/lib/Moose/Meta/TypeConstraint.pm
@@ -135,7 +135,7 @@ sub equals {
my $other = Moose::Util::TypeConstraints::find_type_constraint($type_or_name) or return;
- return 1 if $self == $other;
+ return 1 if (0+$self == 0+$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;
--
1.7.1
--G4iJoqBmSsgzjUCe--
More information about the pkg-perl-maintainers
mailing list