Control: tags -1 upstream patch

-=| Patrik Wallstrom, 12.03.2015 15:21:50 +0100 |=-
> Package: libforks-perl
> Version: 0.36-1+b1
> Severity: normal
> 
> Dear Maintainer,
> 
> Line 1570 on forks.pm has this:
> 
>     local $Storable::Deparse = 1 if $Storable::VERSION >= 2.05;
> 
> So I get the following problem on use:
> 
> expo$~>perl -Mforks
> Argument "2.49_01" isn't numeric in numeric ge (>=) at 
> /usr/lib/x86_64-linux-gnu/perl5/5.20/forks.pm line 1570.
> 
> Since the version apparantly is 2.49_01 and not 2.49, which means that this 
> version of forks is not usable right now.

The last sentence seems to contradict with the bug severity. Can you 
elaborate on libforks-perl usability?

Anyway, the attached patch seems to fix the comparison:

 $ perl -Ilib -Mforks -e1
 $
--- a/lib/forks.pm
+++ b/lib/forks.pm
@@ -1567,8 +1567,10 @@ sub _server {
     
 # 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;
+    use version;
+    my $suitable_storable = version->parse($Storable::VERSION) >= version->parse("2.05");
+    local $Storable::Deparse = 1 if $suitable_storable;
+    local $Storable::Eval    = 1 if $suitable_storable;
 
 # Initialize the number of polls
 # While we're running in the main dispatch loop

Attachment: signature.asc
Description: Digital signature

Reply via email to