It’s being some month now that at work we have encountered a nasty problem with Perl’s module Compress::Zib usage in a tool developed by a colleague. At the moment to start the graphical rendering of a web page the system gave error to our users.
Searching in Apache2’s log I’ve encoutered many error of this kind:
dualvar is only available with the XS version of Scalar::Util at /var/www/html/$MY-APP-PATH/perl/Compress/Zlib.pm line 8
This is because the Scalar-List-Utils module precompiled in RHEL/Fedora/CentOS and similar does NOT have the support of XS weaken function.
You will see a lot of bugs issued on this topic in this part of Linux distro’s.
My solution was to install perl-Task-Weaken package:
In fact as we can read in the package’s description:
rpm -qi perl-Task-Weaken ... URL : http://search.cpan.org/dist/Task-Weaken/ Summary : Ensure that a platform has weaken support Description : One recurring problem in modules that use Scalar::Util's weaken function is that it is not present in the pure-perl variant. This restores the functionality testing to a dependency you do once in your Makefile.PL, rather than something you have to write extra tests for each time you write a module.