Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Using @INC with PAR

by nite_man (Deacon)
on Aug 03, 2004 at 10:27 UTC ( #379572=note: print w/replies, xml ) Need Help??


in reply to Using @INC with PAR

The better way to create a simple script which will check all dependences and install missing modules:

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" } }
This works correct under Linux (I mean install modules). Maybe you should find another way for Windows if it won't work.

---
Schiller

It's only my opinion and it doesn't have pretensions of absoluteness!

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://379572]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (5)
As of 2021-06-13 17:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What does the "s" stand for in "perls"? (Whence perls)












    Results (57 votes). Check out past polls.

    Notices?