From c2f667b4f220c5f3cfb904759b5d4bee679f1ed7 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 27 Jan 2016 16:15:42 +0000 Subject: [PATCH] Bug 15680 - Fresh install of Koha cannot find any dependencies Revert "Bug 6679 - [SIGNED-OFF] fix 2 perlcritic violations in C4/Installer/PerlModules.pm" This reverts commit 0e356b214eb049a446a8d089d579775aa49287d7. Fixing the evals in PerlModules.pm to pass perl critic has caused a regression. If appears that using a block eval will not work here, at least not in its current form. --- C4/Installer/PerlModules.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/C4/Installer/PerlModules.pm b/C4/Installer/PerlModules.pm index 655db74b34..2f40cf559f 100644 --- a/C4/Installer/PerlModules.pm +++ b/C4/Installer/PerlModules.pm @@ -68,7 +68,7 @@ sub version_info { my %params = @_; if ($params{'module'}) { return -1 unless grep {m/$params{'module'}/} keys(%$PERL_DEPS); - eval {require $params{'module'}}; + eval "require $params{'module'}"; if ($@) { return {$params{'module'} => {cur_ver => 0, min_ver => $PERL_DEPS->{$_}->{'min_ver'}, upgrade => 0, required => $PERL_DEPS->{$_}->{'required'}, usage => $PERL_DEPS->{$_}->{'usage'}}}; } @@ -82,7 +82,7 @@ sub version_info { else { for (sort keys(%{$PERL_DEPS})) { my $pkg = $_; # $_ holds the string - eval {require $pkg}; + eval "require $pkg"; if ($@) { push (@{$self->{'missing_pm'}}, {$_ => {cur_ver => 0, min_ver => $PERL_DEPS->{$_}->{'min_ver'}, required => $PERL_DEPS->{$_}->{'required'}, usage => $PERL_DEPS->{$_}->{'usage'}}}); } -- 2.39.5