Fix a Perl 5.12 incompatibility (#757274, RT #56681)

epel9
Petr Šabata 13 years ago
parent 75896f5cb2
commit 28f256f9fc

@ -0,0 +1,15 @@
diff --git a/lib/Devel/Cycle.pm b/lib/Devel/Cycle.pm
index 19d3d63..2c5fdd1 100644
--- a/lib/Devel/Cycle.pm
+++ b/lib/Devel/Cycle.pm
@@ -215,7 +215,9 @@ sub _format_reference {
sub _get_type {
my $thingy = shift;
return unless ref $thingy;
- return 'SCALAR' if UNIVERSAL::isa($thingy,'SCALAR') || UNIVERSAL::isa($thingy,'REF');
+ return 'SCALAR' if UNIVERSAL::isa($thingy,'SCALAR') ||
+ UNIVERSAL::isa($thingy,'REF') ||
+ UNIVERSAL::isa($thingy,'Regexp');
return 'ARRAY' if UNIVERSAL::isa($thingy,'ARRAY');
return 'HASH' if UNIVERSAL::isa($thingy,'HASH');
return 'CODE' if UNIVERSAL::isa($thingy,'CODE');

@ -1,12 +1,12 @@
Name: perl-Devel-Cycle Name: perl-Devel-Cycle
Version: 1.11 Version: 1.11
Release: 7%{?dist} Release: 8%{?dist}
Summary: Find memory cycles in objects Summary: Find memory cycles in objects
License: GPL+ or Artistic License: GPL+ or Artistic
Group: Development/Libraries Group: Development/Libraries
URL: http://search.cpan.org/dist/Devel-Cycle/ URL: http://search.cpan.org/dist/Devel-Cycle/
Source0: http://www.cpan.org/authors/id/L/LD/LDS/Devel-Cycle-%{version}.tar.gz Source0: http://www.cpan.org/authors/id/L/LD/LDS/Devel-Cycle-%{version}.tar.gz
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) Patch0: perl-Devel-Cycle-1.11-512.patch
BuildArch: noarch BuildArch: noarch
BuildRequires: perl(PadWalker) >= 1.0 BuildRequires: perl(PadWalker) >= 1.0
BuildRequires: perl(ExtUtils::MakeMaker) BuildRequires: perl(ExtUtils::MakeMaker)
@ -21,34 +21,31 @@ based memory management, circular references will cause memory leaks.
%prep %prep
%setup -q -n Devel-Cycle-%{version} %setup -q -n Devel-Cycle-%{version}
%patch0 -p1 -b .512
%build %build
%{__perl} Makefile.PL INSTALLDIRS=vendor %{__perl} Makefile.PL INSTALLDIRS=vendor
make %{?_smp_mflags} make %{?_smp_mflags}
%install %install
rm -rf $RPM_BUILD_ROOT make pure_install PERL_INSTALL_ROOT=%{buildroot}
find %{buildroot} -type f -name .packlist -exec rm -f {} \;
make pure_install PERL_INSTALL_ROOT=$RPM_BUILD_ROOT find %{buildroot} -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} %{buildroot}/*
find $RPM_BUILD_ROOT -type f -name .packlist -exec rm -f {} \;
find $RPM_BUILD_ROOT -depth -type d -exec rmdir {} 2>/dev/null \;
%{_fixperms} $RPM_BUILD_ROOT/*
%check %check
make test make test
%clean
rm -rf $RPM_BUILD_ROOT
%files %files
%defattr(-,root,root,-)
%doc Changes README %doc Changes README
%{perl_vendorlib}/* %{perl_vendorlib}/*
%{_mandir}/man3/* %{_mandir}/man3/*
%changelog %changelog
* Mon Nov 28 2011 Petr Šabata <contyk@redhat.com> - 1.11-8
- Fix a Perl 5.12 incompatibility (#757274, RT #56681)
- Remove BuildRoot and defattr
* Sun Jun 19 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.11-7 * Sun Jun 19 2011 Marcela Mašláňová <mmaslano@redhat.com> - 1.11-7
- Perl mass rebuild - Perl mass rebuild

Loading…
Cancel
Save