From 4ce964aafdd213410c19d4a77cfa5519ca273c00 Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Wed, 28 Mar 2018 22:40:09 +0000 Subject: [PATCH] Bug 20103: Readonly::XS is completely bogus post perl 5.8 This patch continues the whitelie that Readonly tells about $XSokay, so that we don't worry people who try to install everything. ./koha_perl_deps.pl -a -- before patch Readonly::XS is 0 -- after patch it's listed as 0.01 (the minimum version) run koha qa test tools --- C4/Installer/PerlModules.pm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/C4/Installer/PerlModules.pm b/C4/Installer/PerlModules.pm index 35cbfeb..27d3148 100644 --- a/C4/Installer/PerlModules.pm +++ b/C4/Installer/PerlModules.pm @@ -81,16 +81,18 @@ sub version_info { eval "require $module"; my $pkg_version = $module->can("VERSION") ? $module->VERSION : 0; my $min_version = $PERL_DEPS->{$module}->{'min_ver'} // 0; + # Readonly.pm tells a whitelie, and so do we. + if ($module eq 'Readonly::XS' && !($] < 5.008)) { $pkg_version = $min_version; $@=q{}; } my ( $cur_ver, $upgrade, $status ); if ($@) { ( $cur_ver, $upgrade, $status ) = ( 0, 0, 'missing' ); } elsif ( version->parse("$pkg_version") < version->parse("$min_version") ) { - ( $cur_ver, $upgrade, $status ) = ( $module->VERSION, 1, 'upgrade' ); + ( $cur_ver, $upgrade, $status ) = ( $pkg_version, 1, 'upgrade' ); } else { - ( $cur_ver, $upgrade, $status ) = ( $module->VERSION, 0, 'current' ); + ( $cur_ver, $upgrade, $status ) = ( $pkg_version, 0, 'current' ); } return { -- 2.1.4