patch to fix warning 'defined(@array) is deprecated' [release 0.207-2mamba;Sat Jun 21 2014]

This commit is contained in:
Silvan Calarco 2024-01-06 09:16:10 +01:00
parent 31115a9cb8
commit 7081cbfeee
2 changed files with 23 additions and 1 deletions

View File

@ -0,0 +1,17 @@
diff --git a/Simple.pm b/Simple.pm
index 74b4447..b19f20e 100644
--- a/Simple.pm
+++ b/Simple.pm
@@ -132,8 +132,8 @@ sub make {
$self->{'lock_by_file'} = {};
# The logxxx routines are autoloaded, so need to check for @EXPORT
- $self->{'wfunc'} = defined(@Log::Agent::EXPORT) ? \&logwarn : \&core_warn;
- $self->{'efunc'} = defined(@Log::Agent::EXPORT) ? \&logerr : \&core_warn;
+ $self->{'wfunc'} = @Log::Agent::EXPORT ? \&logwarn : \&core_warn;
+ $self->{'efunc'} = @Log::Agent::EXPORT ? \&logerr : \&core_warn;
$self->configure(@hlist); # Will init "manager" if necessary
return $self;
--
1.7.5.4

View File

@ -2,7 +2,7 @@
Name: perl-LockFile-Simple Name: perl-LockFile-Simple
Version: 0.207 Version: 0.207
Release: 1mamba Release: 2mamba
Summary: LockFile::Simple - simple file locking scheme Summary: LockFile::Simple - simple file locking scheme
Group: System/Libraries/Perl Group: System/Libraries/Perl
Vendor: openmamba Vendor: openmamba
@ -10,6 +10,7 @@ Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it> Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.cpan.org URL: http://www.cpan.org
Source: http://search.cpan.org/CPAN/authors/id/J/JV/JV/LockFile-Simple-%{version}.tar.gz Source: http://search.cpan.org/CPAN/authors/id/J/JV/JV/LockFile-Simple-%{version}.tar.gz
Patch0: perl-LockFile-Simple-0.207-fix-deprecation-warning.patch
License: GPL, Artistic License: GPL, Artistic
## AUTOBUILDREQ-BEGIN ## AUTOBUILDREQ-BEGIN
BuildRequires: perl-devel BuildRequires: perl-devel
@ -22,6 +23,7 @@ Simple file locking scheme.
%prep %prep
%setup -q -n LockFile-Simple-%{version} %setup -q -n LockFile-Simple-%{version}
%patch0 -p1
%build %build
%{__perl} Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor OPTIMIZE="%{optflags}" %{__perl} Makefile.PL PREFIX=%{_prefix} INSTALLDIRS=vendor OPTIMIZE="%{optflags}"
@ -53,5 +55,8 @@ done
# %doc ChangeLog README # %doc ChangeLog README
%changelog %changelog
* Sat Jun 21 2014 Silvan Calarco <silvan.calarco@mambasoft.it> 0.207-2mamba
- patch to fix warning 'defined(@array) is deprecated'
* Mon Apr 09 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.207-1mamba * Mon Apr 09 2012 Silvan Calarco <silvan.calarco@mambasoft.it> 0.207-1mamba
- package created by autospec - package created by autospec