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 | 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 failed.
! Couldn't find module or a distribution Matt::Daemon
[[email protected] ~]# cpanm Acme::Matt::Daemon
--> Working on Acme::Matt::Daemon
Fetching ... OK
Configuring Acme-Matt-Daemon-0.01 ... OK
==> Found dependencies: Log::Syslog::Abstract, Proc::Daemon
--> Working on Log::Syslog::Abstract
Fetching ... OK
Configuring Log-Syslog-Abstract-1.200 ... OK
==> Found dependencies: Test::Exception, Devel::Hide
--> Working on Test::Exception
Fetching ... OK
Configuring Test-Exception-0.32 ... OK
==> Found dependencies: Sub::Uplevel
--> Working on Sub::Uplevel
Fetching ... 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 ... 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 ... 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.