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 0e356b214e.

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.

(cherry picked from commit c2f667b4f2)
Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
This commit is contained in:
Kyle M Hall 2016-01-27 16:15:42 +00:00 committed by Julian Maurice
parent 30a88f2f34
commit ff73d0415f
1 changed files with 2 additions and 2 deletions

View File

@ -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'}}});
}