| 1 |
Subject: silence Storable version check warnings |
| 2 |
Author: Niko Tyni <[email protected]> |
| 3 |
|
| 4 |
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=102730 |
| 5 |
Bug-Debian: https://bugs.debian.org/780351 |
| 6 |
|
| 7 |
Perl 5.20.2 includes Storable with $VERSION = '2.49_01' |
| 8 |
which generates warnings when compared as a number. |
| 9 |
|
| 10 |
Fix suggested by Karen Etheridge <[email protected]>. |
| 11 |
|
| 12 |
--- libforks-perl.orig/lib/forks.pm |
| 13 |
+++ libforks-perl/lib/forks.pm |
| 14 |
@@ -1567,8 +1567,9 @@ |
| 15 |
|
| 16 |
# Localize Storable variables to allow CODE refs, if using Storable >= 2.05 |
| 17 |
|
| 18 |
- local $Storable::Deparse = 1 if $Storable::VERSION >= 2.05; |
| 19 |
- local $Storable::Eval = 1 if $Storable::VERSION >= 2.05; |
| 20 |
+ my $newStorable = eval { Storable->VERSION('2.05') }; |
| 21 |
+ local $Storable::Deparse = 1 if $newStorable; |
| 22 |
+ local $Storable::Eval = 1 if $newStorable; |
| 23 |
|
| 24 |
# Initialize the number of polls |
| 25 |
# While we're running in the main dispatch loop |