File: 0001-Work-around-a-numification-problem-on-ia64.patch

package info (click to toggle)
libmoose-perl 1.09-2
  • links: PTS, VCS
  • area: main
  • in suites: squeeze
  • size: 3,004 kB
  • ctags: 1,472
  • sloc: perl: 25,387; makefile: 2
file content (29 lines) | stat: -rw-r--r-- 1,113 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
From d6b18c1a4296d6c0c2ac8460a0e6af4560d2a079 Mon Sep 17 00:00:00 2001
From: Niko Tyni <ntyni@debian.org>
Date: Fri, 20 Aug 2010 13:32:31 -0600
Subject: [PATCH] Work around a numification problem on ia64

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