oesxyl
06-15-2008, 03:40 PM
hi,
I want to check if a module is installed. This is the sub I use:
sub checkinstalled {
my $m = shift;
my $v = `$^X -M$m -e 1`;
return 'installed' if $v eq '';
return 'not installed';
}
the problem is that if $v is not '' it produce a server error 500 and stop execution for the rest of the script.
I want to avoid to install other modules from CPAN to do that therefor I need a simple solution using a standard perl installation on a server.
the question is how I can avoid server error 500?
regards
I want to check if a module is installed. This is the sub I use:
sub checkinstalled {
my $m = shift;
my $v = `$^X -M$m -e 1`;
return 'installed' if $v eq '';
return 'not installed';
}
the problem is that if $v is not '' it produce a server error 500 and stop execution for the rest of the script.
I want to avoid to install other modules from CPAN to do that therefor I need a simple solution using a standard perl installation on a server.
the question is how I can avoid server error 500?
regards