Installing Perl Modules on Ubuntu Linux

perl
I’ve been a perl programmer/scripter/hacker for many years now, and I will frequently use CPAN modules to be able to do the out-of-the ordinary. This small guide is intended to help people easily install these modules.

First, let’s get the CPAN module up to date:

$ sudo perl -MCPAN -e shell
(take defaults to set everything up)
cpan> exit
$ sudo perl -MCPAN -e shell
cpan> install Bundle::CPAN

(answer yes to the question about saving data)
cpan> reload cpan

Then, to install a module, it’s simply:
$ sudo perl -MCPAN -e shell
cpan> install <name of module>

cpan> exit

  • http://chorny.net/ Alexandr Ciornii

    Using `cpan` program is easier.
    Simply type `cpan` to run shell or `cpan -i Module::Name` to install without shell.

  • http://www.edsalisbury.net Ed

    Hmm, thanks for the tip! Learn something new every day! :)
    .-= Ed´s last blog ..Installing Perl Modules on Ubuntu Linux =-.

  • http://www.edsalisbury.net/linux/how-to-copy-videos-from-a-series-3-tivo-to-ubuntu-linux/ How to Copy Videos from a Series3 TiVo to Ubuntu Linux | EdSalisbury.net : Your Guide to User-Friendly Entertainment

    [...] will also need to install the following CPAN perl [...]