commit add61beb29a082cd1f530f117be5ca5082c84a6a
Author: Iain Arnell <iarnell(a)gmail.com>
Date: Wed Dec 1 18:30:17 2010 +0100
apply upstream fix for RHBZ #658453
...ug-that-is-probably-a-bug-in-List-MoreUti.patch | 35 ++++++++++++++++++++
perl-Moose.spec | 7 +++-
2 files changed, 41 insertions(+), 1 deletions(-)
---
diff --git a/0001-Fix-weird-bug-that-is-probably-a-bug-in-List-MoreUti.patch
b/0001-Fix-weird-bug-that-is-probably-a-bug-in-List-MoreUti.patch
new file mode 100644
index 0000000..562e140
--- /dev/null
+++ b/0001-Fix-weird-bug-that-is-probably-a-bug-in-List-MoreUti.patch
@@ -0,0 +1,35 @@
+From f1fc0e095eeb517241d64511892f2c9a5f805b56 Mon Sep 17 00:00:00 2001
+From: Dave Rolsky <autarch(a)urth.org>
+Date: Tue, 14 Sep 2010 11:18:09 -0500
+Subject: [PATCH] Fix weird bug that is probably a bug in List::MoreUtils
+
+---
+ lib/Moose/Meta/TypeConstraint/Union.pm | 5 +++--
+ 1 files changed, 3 insertions(+), 2 deletions(-)
+
+diff --git a/lib/Moose/Meta/TypeConstraint/Union.pm
b/lib/Moose/Meta/TypeConstraint/Union.pm
+index 8136d04..0af99a3 100644
+--- a/lib/Moose/Meta/TypeConstraint/Union.pm
++++ b/lib/Moose/Meta/TypeConstraint/Union.pm
+@@ -7,7 +7,6 @@ use metaclass;
+
+ use Moose::Meta::TypeCoercion::Union;
+
+-use List::MoreUtils qw(any);
+ use List::Util qw(first);
+
+ our $VERSION = '1.12';
+@@ -46,7 +45,9 @@ sub coercion {
+
+ return $self->{coercion} if exists $self->{coercion};
+
+- if ( any { $_->has_coercion } @{ $self->type_constraints } ) {
++ # Using any instead of grep here causes a weird error with some corner
++ # cases when MX::Types is in use. See RT #61001.
++ if ( grep { $_->has_coercion } @{ $self->type_constraints } ) {
+ return $self->{coercion} = Moose::Meta::TypeCoercion::Union->new(
+ type_constraint => $self );
+ }
+--
+1.7.2.3
+
diff --git a/perl-Moose.spec b/perl-Moose.spec
index 6ffe128..cf3a458 100644
--- a/perl-Moose.spec
+++ b/perl-Moose.spec
@@ -1,10 +1,11 @@
Name: perl-Moose
Summary: Complete modern object system for Perl 5
Version: 1.12
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPL+ or Artistic
Group: Development/Libraries
Source0:
http://search.cpan.org/CPAN/authors/id/D/DR/DROLSKY/Moose-%{version}.tar.gz
+Patch0: 0001-Fix-weird-bug-that-is-probably-a-bug-in-List-MoreUti.patch
URL:
http://search.cpan.org/dist/
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
Requires: perl(:MODULE_COMPAT_%(eval "`%{__perl} -V:version`"; echo
$version))
@@ -78,6 +79,7 @@ very welcome.
%prep
%setup -q -n Moose-%{version}
+%patch0 -p 1
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
@@ -115,6 +117,9 @@ rm -rf %{buildroot}
%{_mandir}/man3/Test::Moose*
%changelog
+* Wed Dec 01 2010 Iain Arnell <iarnell(a)gmail.com> 1.12-2
+- apply upstream fix for RHBZ #658453
+
* Sat Nov 13 2010 Iain Arnell <iarnell(a)gmail.com> 1.12-1
- update to 1.12