fix the checkModule issue.

I let testEnvirement.pl to install the modules missing in my system, after one missing module is installed and the checkModule() is called again to verify the module is installed,  but checkModule() exit even the install was success.
This commit is contained in:
kenperl 2006-01-16 06:45:28 +00:00
parent 6e7f87dde1
commit a07e41f5ee

View file

@ -164,7 +164,10 @@ sub checkModule {
printTest("Checking for module $module");
my $statement = "require ".$module.";";
if ($afterinstall == 1) {
failAndExit("Install of $module failed!");
failAndExit("Install of $module failed!") unless eval($statement);
# //todo: maybe need to check new install module version
printResult("OK");
return;
} elsif (eval($statement)) {
$statement = '$'.$module."::VERSION";
my $currentVersion = eval($statement);