[libforks-perl] 01/03: Silence numerical comparison warnings triggered by Perl 5.20.2. (Closes: 780351)

Niko Tyni ntyni at moszumanska.debian.org
Sat Mar 21 19:49:41 UTC 2015


This is an automated email from the git hooks/post-receive script.

ntyni pushed a commit to branch master
in repository libforks-perl.

commit 49d2a103d66da8657253a740f606edf34a0b9b09
Author: Niko Tyni <ntyni at debian.org>
Date:   Sat Mar 21 19:39:28 2015 +0200

    Silence numerical comparison warnings triggered by Perl 5.20.2. (Closes: 780351)
    
    Perl 5.20.2 includes Storable with $VERSION = '2.49_01' which generates
    warnings when compared as a number. Use UNIVERSAL::VERSION() instead,
    as suggested by Karen Etheridge in the upstream ticket.
---
 debian/patches/series                 |  1 +
 debian/patches/storable-version-check | 25 +++++++++++++++++++++++++
 2 files changed, 26 insertions(+)

diff --git a/debian/patches/series b/debian/patches/series
new file mode 100644
index 0000000..d2effca
--- /dev/null
+++ b/debian/patches/series
@@ -0,0 +1 @@
+storable-version-check
diff --git a/debian/patches/storable-version-check b/debian/patches/storable-version-check
new file mode 100644
index 0000000..bdd368b
--- /dev/null
+++ b/debian/patches/storable-version-check
@@ -0,0 +1,25 @@
+Subject: silence Storable version check warnings
+Author: Niko Tyni <ntyni at debian.org>
+
+Bug: https://rt.cpan.org/Public/Bug/Display.html?id=102730
+Bug-Debian: https://bugs.debian.org/780351
+
+Perl 5.20.2 includes Storable with $VERSION = '2.49_01'
+which generates warnings when compared as a number.
+
+Fix suggested by Karen Etheridge <ether at cpan.org>.
+
+--- libforks-perl.orig/lib/forks.pm
++++ libforks-perl/lib/forks.pm
+@@ -1567,8 +1567,9 @@
+     
+ # Localize Storable variables to allow CODE refs, if using Storable >= 2.05
+ 
+-    local $Storable::Deparse = 1 if $Storable::VERSION >= 2.05;
+-    local $Storable::Eval = 1 if $Storable::VERSION >= 2.05;
++    my $newStorable = eval { Storable->VERSION('2.05') };
++    local $Storable::Deparse = 1 if $newStorable;
++    local $Storable::Eval = 1 if $newStorable;
+ 
+ # Initialize the number of polls
+ # While we're running in the main dispatch loop

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libforks-perl.git



More information about the Pkg-perl-cvs-commits mailing list