in reply to Installer Program
On to your specific questions however ...
To my mind, the quickest would be to actually try and use the module - For example:
eval { require $module; } if ($@) { # handling for when module fails to load }
This approach to module and library handling is discussed in the perlfunc:require man page.
The init method from the module CPAN::FirstTime is invoked which attempts to configure the CPAN module by prompting the user for information and writing a CPAN::Config configuration file.
While the majority of sendmail installations use the target location of /usr/sbin/sendmail, this is not absolute and should not be relied upon. A better way would be to search for the sendmail binary within your script, making use of the File::Find module. However, for better cross-platform compatibility, it may be better still to prompt the user for the local network mail server and communicate directly via SMTP - The advantage which this has is that your script installation is not dependent upon a local sendmail installation for execution and offers greater flexibility to administrators who may wish to impose local mail security policies.
Good luck! :-)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Installer Program
by Molt (Chaplain) on May 20, 2002 at 10:02 UTC | |
|
Re: Re: Installer Program
by Flame (Deacon) on May 20, 2002 at 20:07 UTC |