[perl-Switch] fix build against Filter 1.50
Tom Callaway
spot at fedoraproject.org
Tue Jun 10 17:06:40 UTC 2014
commit 9058dac43e37e742c63bad46c5b6c088e912db76
Author: Tom Callaway <spot at fedoraproject.org>
Date: Tue Jun 10 13:06:31 2014 -0400
fix build against Filter 1.50
Switch-2.17-Filter-1.50.patch | 16 ++++++++++++++++
perl-Switch.spec | 2 ++
2 files changed, 18 insertions(+), 0 deletions(-)
---
diff --git a/Switch-2.17-Filter-1.50.patch b/Switch-2.17-Filter-1.50.patch
new file mode 100644
index 0000000..8783e7a
--- /dev/null
+++ b/Switch-2.17-Filter-1.50.patch
@@ -0,0 +1,16 @@
+diff -up Switch-2.17/Switch.pm.fixme Switch-2.17/Switch.pm
+--- Switch-2.17/Switch.pm.fixme 2014-06-10 13:03:40.395988520 -0400
++++ Switch-2.17/Switch.pm 2014-06-10 13:04:50.909488953 -0400
+@@ -25,9 +25,11 @@ my ($Perl5, $Perl6) = (0,0);
+
+ sub import
+ {
++ my ($class) = @_;
++ my $self = bless {}, $class;
+ $fallthrough = grep /\bfallthrough\b/, @_;
+ $offset = (caller)[2]+1;
+- filter_add({}) unless @_>1 && $_[1] eq 'noimport';
++ filter_add($self) unless @_>1 && $_[1] eq 'noimport';
+ my $pkg = caller;
+ no strict 'refs';
+ for ( qw( on_defined on_exists ) )
diff --git a/perl-Switch.spec b/perl-Switch.spec
index 739861b..ba6218e 100644
--- a/perl-Switch.spec
+++ b/perl-Switch.spec
@@ -6,6 +6,7 @@ Group: Development/Libraries
License: GPL+ or Artistic
URL: http://search.cpan.org/dist/Switch/
Source0: http://search.cpan.org/CPAN/authors/id/R/RG/RGARCIA/Switch-%{version}.tar.gz
+Patch0: Switch-2.17-Filter-1.50.patch
BuildRequires: perl
%if 0%(perl -e 'print $] > 5.011')
BuildRequires: perl(deprecate)
@@ -31,6 +32,7 @@ various cases.
%prep
%setup -q -n Switch-%{version}
+%patch0 -p1 -b .fixme
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
More information about the scm-commits
mailing list