How To Install Perl Modules With CPAN?
Perl is a old and popular scripting language. Todays Python is preferred over Perl but there are a lot of useful tools used already by system administrators. There are generally problem of dependency for Perl scripts. Here we will look how to install required Perl modules in to Linux.
Install Via CPAN
CPAN is very good solution to install modules. It resolves and install dependencies easily. CPAN is very easy to use versus installing modules manually.
CentOS, Fedora
1 |
$ yum install perl-CPAN.noarch |
Ubuntu, Debian
1 |
$ sudo apt-get install libpath-tiny-perl |

Install MIME
Now we will install MIME::Lite package from CPAN repositories
1 |
# cpan> install MIME::Lite |

Install Perl Modules With CPAN From Bash
We can run installation process without entering CPAN shell like below.
1 |
$ cpan -i MIME::Lite |
-i parameter simple provides install command like in CPAN shell.