Nitrox has asked for the wisdom of the Perl Monks concerning the following question:
For example, if the 'install' script needs WIN32::SomeModule then I can catch 'use' errors and install the module (assuming an internet connection and it existing in the PPM repository) with:
But will a subsequent 'use Win32::SomeModule' fail also since the interpreter is already running with the library collection that existed at the time of execution?BEGIN { unless(eval "use Win32::SomeModule") { warn "Couldn't load Win32::SomeModule"; print `ppm install Win32::SomeModule`; } }
Furthermore, if I'm aware that a required module is not available in a PPM repository, has anyone experimented with auto downloading/compiling/installing from CPAN?
If a node already exists on this subject please point me to the proper place, thanks!
-Nitrox
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Auto-Installing Modules
by valdez (Monsignor) on Oct 30, 2002 at 18:42 UTC | |
|
Re: Auto-Installing Modules
by Nitrox (Chaplain) on Oct 30, 2002 at 22:07 UTC |