1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
|
From f3268a0295ec4433c3154adb2572b4712570886e Mon Sep 17 00:00:00 2001
From: Niko Tyni <ntyni@debian.org>
Date: Sat, 19 Sep 2015 20:41:47 +0300
Subject: [PATCH] Don't compare version numbers numerically
Perl 5.20.2 has Storable 2.49_01, which generates warnings when
compared as a number. Use UNIVERSAL::VERSION() instead,
as suggested by Kevin Ryde.
Bug-Debian: https://bugs.debian.org/782676
Bug: https://rt.cpan.org/Public/Bug/Display.html?id=94046
Forwarded: not-needed; already fixed upstream apparently
---
lib/Graph.pm | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/lib/Graph.pm b/lib/Graph.pm
index e96acb4..cb9c06c 100644
--- a/lib/Graph.pm
+++ b/lib/Graph.pm
@@ -19,7 +19,13 @@ $VERSION = '0.96';
require 5.006; # Weak references are absolutely required.
my $can_deep_copy_Storable =
- eval 'require Storable; require B::Deparse; $Storable::VERSION >= 2.05 && $B::Deparse::VERSION >= 0.61' && !$@;
+ eval {
+ require Storable;
+ require B::Deparse;
+ Storable->VERSION(2.05);
+ B::Deparse->VERSION(0.61);
+ }
+ && !$@;
sub _can_deep_copy_Storable () {
return $can_deep_copy_Storable;
--
2.5.1
|