X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=blobdiff_plain;f=C4%2FInstaller%2FPerlModules.pm;h=1f9e57fb2edec7ea078ea59ce9ed6fa10d58fbc5;hb=4fe0af468bf017a46ada8858ef6c0493f3c76321;hp=9419ce836d819375c6d3ab9a5c9b524c7cee1a73;hpb=52df15548079c0275d290cb30235840decf96021;p=koha_gimpoz diff --git a/C4/Installer/PerlModules.pm b/C4/Installer/PerlModules.pm index 9419ce836d..1f9e57fb2e 100644 --- a/C4/Installer/PerlModules.pm +++ b/C4/Installer/PerlModules.pm @@ -80,16 +80,17 @@ sub version_info { } } else { - for (keys(%$PERL_DEPS)) { - eval "require $_"; + for (sort keys(%{$PERL_DEPS})) { + my $pkg = $_; # $_ holds the string + 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'}}}); } - elsif ($_->VERSION lt $PERL_DEPS->{$_}->{'min_ver'}) { - push (@{$self->{'upgrade_pm'}}, {$_ => {cur_ver => $_->VERSION, min_ver => $PERL_DEPS->{$_}->{'min_ver'}, required => $PERL_DEPS->{$_}->{'required'}, usage => $PERL_DEPS->{$_}->{'usage'}}}); + elsif ($pkg->VERSION lt $PERL_DEPS->{$_}->{'min_ver'}) { + push (@{$self->{'upgrade_pm'}}, {$_ => {cur_ver => $pkg->VERSION, min_ver => $PERL_DEPS->{$_}->{'min_ver'}, required => $PERL_DEPS->{$_}->{'required'}, usage => $PERL_DEPS->{$_}->{'usage'}}}); } else { - push (@{$self->{'current_pm'}}, {$_ => {cur_ver => $_->VERSION, min_ver => $PERL_DEPS->{$_}->{'min_ver'}, required => $PERL_DEPS->{$_}->{'required'}, usage => $PERL_DEPS->{$_}->{'usage'}}}); + push (@{$self->{'current_pm'}}, {$_ => {cur_ver => $pkg->VERSION, min_ver => $PERL_DEPS->{$_}->{'min_ver'}, required => $PERL_DEPS->{$_}->{'required'}, usage => $PERL_DEPS->{$_}->{'usage'}}}); } } return; @@ -238,8 +239,8 @@ This file is part of Koha. Koha is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -You should have received a copy of the GNU General Public License along with Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place, -Suite 330, Boston, MA 02111-1307 USA +You should have received a copy of the GNU General Public License along with Koha; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, +Fifth Floor, Boston, MA 02110-1301 USA. =head1 DISCLAIMER OF WARRANTY