workaround for version-checking bug in perl forks.pm
David Newman <[email protected]>
| Newsgroups | gmane.mail.virus.maiamailguard |
|---|---|
| Message-ID | <[email protected]> |
At least on FreeBSD and Debian Linux, the process-quarantine.pl script fails with an error like this (from a FreeBSD 10.1 box): Argument "2.49_01" isn't numeric in numeric ge (>=) at /usr/local/lib/perl5/site_perl/mach/5.20/forks.pm line 1570. This has been a known issue in the perl forks.pm module for at least a few months. A Debian developer suggested this workaround, using eval: https://rt.cpan.org/Public/Bug/Display.html?id=102730 I have attached a patch for the FreeBSD version of forks.pm. The process-quarantine.pl script stopped complaining after changing these two lines. dn _______________________________________________ Maia-users mailing list [email protected] http://www.renaissoft.com/cgi-bin/mailman/listinfo/maia-users
forksPatch.txt
(text/plain, 568 B)
--- forks.pm 2015-08-09 16:53:42.000000000 -0700
+++ forks.pm.patched 2015-08-09 16:54:06.000000000 -0700
@@ -1567,8 +1567,8 @@
# 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;
+ local $Storable::Deparse = 1 if eval { Storable->VERSION('2.05') };
+ local $Storable::Eval = 1 if eval { Storable->VERSION('2.05') };
# Initialize the number of polls
# While we're running in the main dispatch loop