Bug 20103: Readonly::XS is completely bogus post perl 5.8

A ha! Lie about who we are, and the module will return a version.

./koha_perl_deps.pl -a
-- before patch Readonly::XS is 0
-- after patch it has a version number.
run koha qa test tools

Signed-off-by: Victor Grousset <victor.grousset@biblibre.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
Mark Tompsett 2018-03-28 22:40:09 +00:00 committed by Jonathan Druart
parent b7787d1022
commit 6d59eee2ba
1 changed files with 1 additions and 0 deletions

View File

@ -78,6 +78,7 @@ sub version_info {
my ( $self, $module ) = @_;
return -1 unless grep { /^$module$/ } keys(%$PERL_DEPS);
$Readonly::XS::MAGIC_COOKIE="Do NOT use or require Readonly::XS unless you're me.";
eval "require $module";
my $pkg_version = $module->can("VERSION") ? $module->VERSION : 0;
my $min_version = $PERL_DEPS->{$module}->{'min_ver'} // 0;