in reply to Using @INC with PAR
The better way to create a simple script which will check all dependences and install missing modules:
This works correct under Linux (I mean install modules). Maybe you should find another way for Windows if it won't work.my $list_modules = { 'SOAP::Lite' => '0.60', 'Time::Local' => ''}; for my $module (@$list_modules) { eval "use $module $list_modules->{$module}"; if($@) { my $error = $@; $error =~ s/\n(.*)$//s; print "Not found!!!\n"; print "\t$error\n" if $error =~ /this is only/; if($install) { CPAN::Shell->install($module, $list_modules->{ +$module}); } } else { print "Ok\n" } }
---
Schiller
It's only my opinion and it doesn't have pretensions of absoluteness!
|
|---|