Chris Devers wrote:
On Fri, 26 Aug 2005, Binish A R wrote:
I've my script which uses Expect Module.
But the problem is that Expect module isn't installed by default ( at
least in the machines that I've checked, viz RH9 )
Can I write some code that will automatically install a module from
CPAN if there isn't one?
Sure, go ahead.
What code have you tried so far ?
I'm sure you've tried this already, but you can probably write some code
that uses the CPAN.pm or CPANPLUS.pm modules to assist here. And I know
you'll have thought of this already, but the usual way to install
modules on *nix depends on admin access, so you'll have to get the
people running the script to use sudo or root privs, so find a way to
handle that, too. Oh and if it'll run on Windows, then that will also
take some setup work that you'll probably have to get the user involved
with, at least to provide configuration info.
But yeah, I'm sure it can be done.
Can you do it? Sure you can! We won't hold you back :-)
So... What code have you tried so far?
I've written a automatic login script, which uses Expect module.
We have a local network here. The script run fine in my machine,
but would fail on others since Expect module is missing in the default
perl installation.
Well
perldoc CPAN
has some nice examples ... but still that requires root access on that very machine :D
--
|