Perl-Sensitive Sunglasses | |
PerlMonks |
Auto Install of Modulesby hubb0r (Pilgrim) |
on Aug 04, 2005 at 16:50 UTC ( [id://480927]=perlquestion: print w/replies, xml ) | Need Help?? |
hubb0r has asked for the wisdom of the Perl Monks concerning the following question:
Hello O Glorious Monks!
I'm attempting to include some code in my script that will automatically take care of the installation of the modules I require without user intervention. This will make the initial installation of this script much simpler (it is for in-house use, but will be distributed to many servers). I've done the following: and all has gone as planned. Horray! The problem is, what I want to do is the following: but for some reason, the eval is returning false even though the modules do exist, and forcing my cpan installation to be attempted again. AHA!! I just figured it out, after re-reading perldoc -f require. I'll post the question anyways in the hopes of enlightening someone in the future that may run into the same issue. The trick is: Which I somehow glossed over on my first reading of the perldoc. I'm glad I figured it out! I guess I'll change the question to this: Does anyone feel this is a good or bad design decision to do this type of auto-installation for a script? Should I attempt to make the installation portion interactive, perhaps prompting the user as to whether or not they really want to install the modules? Thanks for your time...
Back to
Seekers of Perl Wisdom
|
|