Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I install a module and its dependencies in ActivePerl on Windows?

Tags:

module

perl

I want to send emails using gmail's smtp servers and perl. I am trying to install Email::Send::Gmail, but it is not clear to me what are the steps to install it. It seems that it depends on other modules that I do not have installed.

like image 587
user123668 Avatar asked Dec 10 '09 13:12

user123668


3 Answers

This is partially dependent on which distribution of Perl you're using.

ActivePerl includes a utility called PPM (Perl Package Manager) for installing modules. It handles dependency resolution automatically. PPM is particularly nice for installing XS modules on Windows where a compiler isn't typically available. The downside to PPM is that it some CPAN modules aren't available (probably because they fail ActiveState's automated build process). You can run PPM from either the start menu or by typing ppm at a command prompt.

A more general option is to use the interactive CPAN shell. Note that you must have a compiler to install XS modules using this method. You can access the cpan shell by typing cpan at a command prompt.

The brute-force approach of last resort is to download tarballs from CPAN and manually install them one at a time. When an install aborts due to unsatisfied dependencies download and install them then go back to the first module and try again.

like image 58
Michael Carman Avatar answered Oct 22 '22 14:10

Michael Carman


Type:

 cpan Email::Send::Gmail

… at the command prompt.

It's probably a good idea to set up local::lib first.

Or see the Perl Foundation Wiki on installing CPAN modules or the same but without root access.

Or see the CPAN guide to installing modules.

like image 3
Quentin Avatar answered Oct 22 '22 14:10

Quentin


If you are using ActivePerl, try the PPM (Perl Package Manager) tool that comes with ActivePerl first. When you tell it to install a module, it should handle all of the dependencies for you.

Note the dependency tree for Email::Send::Gmail. Some of those modules require additional installation of third party software, most notably OpenSSL, which cpan won't do for you.

like image 3
brian d foy Avatar answered Oct 22 '22 16:10

brian d foy