Wednesday, July 9, 2008

How to install Perl modules

For example to install Mail::Mailer module, you can use below
command

perl -MCPAN -e 'install Mail::Mailer'

Also refer http://www.cpan.org/modules/INSTALL.html for another
approach

Offline Installation of Perl module
perl Makefile.PL
make
make test
make install 

How do I find out what modules are already installed on my system?

Each time a module is installed on your system, it appends information like the following to a file called perllocal.pod which can be found in /usr/local/lib/perl5/version number/architecture/ or something akin to that. The path for your specific installation is in your @INC which you can divine with perl -V.
=head2 Wed May 12 13:42:53 1999: C L
=over 4
=item *
C
=item *
C
=item *
C
=item *
C
=back

Each entry includes the Module name, date and time it was installed, where it was installed, linktype [ static or dynamic ], version and executables, if any, included with the module.

Another way to do this is http://vijayk.blogspot.com/2008/06/list-all-installed-perl-modules.html

No comments: