App::cpanminus – The Skinny

It came to my attention today when I was asked to help a fellow programmer with a Perl Module dependency issue that not everyone is aware of cpanm / App::cpanminus. This perl module provides an amazing tool for installing Perl Modules and their dependencies.

How to install

A nice simple install just copy and paste this in your terminal:

curl -L http://cpanmin.us | perl - --sudo App::cpanminus

Example of Installing a Module

[[email protected] ~]# cpanm Matt::Daemon
! Finding Matt::Daemon on cpanmetadb failed.
! Finding Matt::Daemon () on mirror http://www.cpan.org failed.
! Couldn't find module or a distribution Matt::Daemon
[[email protected] ~]# cpanm Acme::Matt::Daemon
--> Working on Acme::Matt::Daemon
Fetching http://www.cpan.org/authors/id/R/RK/RKRIMEN/Acme-Matt-Daemon-0.01.tar.gz ... OK
Configuring Acme-Matt-Daemon-0.01 ... OK
==> Found dependencies: Log::Syslog::Abstract, Proc::Daemon
--> Working on Log::Syslog::Abstract
Fetching http://www.cpan.org/authors/id/D/DO/DONEILL/Log-Syslog-Abstract-1.200.tar.gz ... OK
Configuring Log-Syslog-Abstract-1.200 ... OK
==> Found dependencies: Test::Exception, Devel::Hide
--> Working on Test::Exception
Fetching http://www.cpan.org/authors/id/A/AD/ADIE/Test-Exception-0.32.tar.gz ... OK
Configuring Test-Exception-0.32 ... OK
==> Found dependencies: Sub::Uplevel
--> Working on Sub::Uplevel
Fetching http://www.cpan.org/authors/id/D/DA/DAGOLDEN/Sub-Uplevel-0.24.tar.gz ... OK
Configuring Sub-Uplevel-0.24 ... OK
Building and testing Sub-Uplevel-0.24 ... OK
Successfully installed Sub-Uplevel-0.24
Building and testing Test-Exception-0.32 ... OK
Successfully installed Test-Exception-0.32
--> Working on Devel::Hide
Fetching http://www.cpan.org/authors/id/F/FE/FERREIRA/Devel-Hide-0.0009.tar.gz ... OK
Configuring Devel-Hide-0.0009 ... OK
Building and testing Devel-Hide-0.0009 ... OK
Successfully installed Devel-Hide-0.0009
Building and testing Log-Syslog-Abstract-1.200 ... OK
Successfully installed Log-Syslog-Abstract-1.200
--> Working on Proc::Daemon
Fetching http://www.cpan.org/authors/id/D/DE/DETI/Proc/Proc-Daemon-0.14.tar.gz ... OK
Configuring Proc-Daemon-0.14 ... OK
Building and testing Proc-Daemon-0.14 ... OK
Successfully installed Proc-Daemon-0.14
Building and testing Acme-Matt-Daemon-0.01 ... OK
Successfully installed Acme-Matt-Daemon-0.01
6 distributions installed

Voila! Didn’t have to manually go through and install those modules. Love it, use it – work smarter, not harder.

Write a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.