Help - Search - Members - Calendar
Full Version: Perl help needed
The Planet Forums > General > The Lounge
I-WebSolutions
OK i need to install


Mail::sendmail and Mail::pop3 for a script i am working on.....

i checked the cpan site and it says to use the following command line

perl -MCPAN -e "install Mail::Sendmail"

Anyone done this before? and if so know the routine (what q's to answer what to etc.......)

Thanks in advance for any help
mouse
even easier

goto search.cpan.org
search for the perl modules you need
copy the URL for the download
then
wget url/file.tar.gz
tar zxvf file.tar.gz
cd file
perl Makefile.PL <---- notice CapS usage
make
make test
make install

IF it errors on perl Makefile.PL command, cd .. find the pre reqs it asks for, install them in same fashion and then continue as shown.. Mouse
dafonso
QUOTE
Originally posted by I-WebSolutions
OK i need to install


Mail::sendmail and Mail::pop3 for a script i am working on.....

i checked the cpan site and it says to use the following command line

perl -MCPAN -e "install Mail::Sendmail"  

Anyone done this before? and if so know the routine (what q's to answer what to etc.......)

Thanks in advance for any help


Plenty of times. You can also go with 'perl -MCPAN -e "shell" ' and use the interactive system

You can use "i part of package name to get some information on packages, and 'install package' to, well, install the package... you can also type 'help', and it will enlighten you.

Getting the modules via wget, untarring, and installing is fine and good if you've already got them, but if you're not so sure about where to get them, or which package you're looking for, this is a pretty good way to go.
perldork
Agreed icon_smile.gif ... Mouse likes the old school way icon_smile.gif and that will work, but after doing that n-thousand times, just doing (as root)


# perl -MCPAN -e shell
cpan> install Mail::Sendmail


is nice .. most of the time CPAN will also let you know if the module you are installing has dependencies that aren't yet in your perl installation and will then go get them and install them as well ...
Azhrarn
QUOTE
Originally posted by perldork
most of the time CPAN will also let you know if the module you are installing has dependencies that aren't yet in your perl installation and will then go get them and install them as well ...


Indeed. That's why I always try to use cpan (or maybe ppm under windows) for perl modules.

CPAN is definitely worth setting up, as you can easily search for new modules in the future. It also keeps track of module versions for you so you can do a batch upgrade to recent versions. The only time I ever have some problems with it is doing a seperate local (non-root) install. But that is usually just a matter of making sure you have a proper @INC in your programs, and messing with targets for make.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.