patch to avoid warnings for 'defined(@array)' - rt#74225

This commit is contained in:
Iain Arnell 2012-06-28 05:36:46 -06:00
parent a2f12f57cb
commit 1b877eb800
2 changed files with 20 additions and 1 deletions

View File

@ -1,11 +1,14 @@
Name: perl-Devel-Hide
Version: 0.0008
Release: 10%{?dist}
Release: 11%{?dist}
Summary: Forces the unavailability of specified Perl modules (for testing)
License: GPL+ or Artistic
Group: Development/Libraries
URL: http://search.cpan.org/dist/Devel-Hide/
Source0: http://www.cpan.org/authors/id/F/FE/FERREIRA/Devel-Hide-%{version}.tar.gz
# 'defined(@array)' is deprecated - avoid warnings
# see https://rt.cpan.org/Public/Bug/Display.html?id=74225
Patch0: rt74225.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildArch: noarch
BuildRequires: perl(ExtUtils::MakeMaker)
@ -21,6 +24,7 @@ installed or not).
%prep
%setup -q -n Devel-Hide-%{version}
%patch0 -p1
%build
%{__perl} Makefile.PL INSTALLDIRS=vendor
@ -49,6 +53,9 @@ rm -rf $RPM_BUILD_ROOT
%{_mandir}/man3/*
%changelog
* Thu Jun 28 2012 Iain Arnell <iarnell@gmail.com> 0.0008-11
- patch to avoid warnings for 'defined(@array)' - rt#74225
* Tue Jun 12 2012 Petr Pisar <ppisar@redhat.com> - 0.0008-10
- Perl 5.16 rebuild

12
rt74225.patch Normal file
View File

@ -0,0 +1,12 @@
diff -up Devel-Hide-0.0008/lib/Devel/Hide.pm.orig Devel-Hide-0.0008/lib/Devel/Hide.pm
--- Devel-Hide-0.0008/lib/Devel/Hide.pm.orig 2007-11-15 07:45:02.000000000 -0700
+++ Devel-Hide-0.0008/lib/Devel/Hide.pm 2012-06-28 05:27:24.000000000 -0600
@@ -101,7 +101,7 @@ sub _push_hidden {
BEGIN {
# unless @HIDDEN was user-defined elsewhere, set default
- if ( !defined @HIDDEN && $ENV{DEVEL_HIDE_PM} ) {
+ if ( !@HIDDEN && $ENV{DEVEL_HIDE_PM} ) {
_push_hidden( split q{ }, $ENV{DEVEL_HIDE_PM} );
# NOTE. "split ' ', $s" is special. Read "perldoc -f split".