CPANをもっと便利に出来るコマンド cpanm – perlモジュール App::cpanminus

CPANをもっと便利に出来るコマンド cpanm – perlモジュール App::cpanminus

App::cpanminusって?

CPANをもっと簡単に使える様にするperlモジュール。
参照:
http://yellowstore.blogspot.com/2010/04/perlperlercpanminus.html

インストール

# cpan App::cpanminus

または、

cpan> install App::cpanminus

2010-12-16追記
他のインストール方法(CPANを設定しなくてもインストール出来る)
perlモジュールのinstallにcpanmを使う|perl|@OMAKASE

$ mkdir bin && cd ~/bin
$ wget http://xrl.us/cpanm
$ chmod +x cpanm

※環境によっては
$ wget http://xrl.us/cpanm --no-check-certificate
としないとダメな場合がある模様。CentOS5.5 x86_64環境では必要でした。

cpanm と合わせて local::lib も入れておくと便利です

$ cpanm local::lib

使い方

>大ブレイク中のPSGI実装Plackをインストールしてみました。

と言う事で、自分も同じものを。

# cpanm Plack
Fetching http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/Plack-0.9938.tar.gz ... OK
Configuring Plack-0.9938 ... OK
==> Found dependencies: Hash::MultiValue, Try::Tiny, Test::Requires, parent, HTTP::Body, Test::TCP, Filesys::Notify::Simple, File::ShareDir, Devel::StackTrace::AsHTML
Fetching http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/Hash-MultiValue-0.08.tar.gz ... OK
Configuring Hash-MultiValue-0.08 ... OK
Building and testing Hash-MultiValue-0.08 for Hash::MultiValue ... OK
Successfully installed Hash-MultiValue-0.08
Fetching http://search.cpan.org/CPAN/authors/id/N/NU/NUFFIN/Try-Tiny-0.06.tar.gz ... OK
Configuring Try-Tiny-0.06 ... OK
Building and testing Try-Tiny-0.06 for Try::Tiny ... OK
Successfully installed Try-Tiny-0.06
Fetching http://search.cpan.org/CPAN/authors/id/T/TO/TOKUHIROM/Test-Requires-0.05.tar.gz ... OK
Configuring Test-Requires-0.05 ... OK
Building and testing Test-Requires-0.05 for Test::Requires ... OK
Successfully installed Test-Requires-0.05
Fetching http://search.cpan.org/CPAN/authors/id/C/CO/CORION/parent-0.223.tar.gz ... OK
Configuring parent-0.223 ... OK
Building and testing parent-0.223 for parent ... OK
Successfully installed parent-0.223
Fetching http://search.cpan.org/CPAN/authors/id/M/MR/MRAMBERG/HTTP-Body-1.07.tar.gz ... OK
Configuring HTTP-Body-1.07 ... OK
==> Found dependencies: IO::File, Test::Deep
Fetching http://search.cpan.org/CPAN/authors/id/G/GB/GBARR/IO-1.25.tar.gz ... OK
Configuring IO-1.25 ... OK
Building and testing IO-1.25 for IO::File ... OK
Successfully installed IO-1.25 (upgraded from 1.13)
Fetching http://search.cpan.org/CPAN/authors/id/F/FD/FDALY/Test-Deep-0.106.tar.gz ... OK
Configuring Test-Deep-0.106 ... OK
==> Found dependencies: Test::NoWarnings
Fetching http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Test-NoWarnings-1.01.tar.gz ... OK
Configuring Test-NoWarnings-1.01 ... OK
Building and testing Test-NoWarnings-1.01 for Test::NoWarnings ... OK
Successfully installed Test-NoWarnings-1.01
Building and testing Test-Deep-0.106 for Test::Deep ... OK
Successfully installed Test-Deep-0.106
Building and testing HTTP-Body-1.07 for HTTP::Body ... OK
Successfully installed HTTP-Body-1.07
Fetching http://search.cpan.org/CPAN/authors/id/T/TO/TOKUHIROM/Test-TCP-0.16.tar.gz ... OK
Configuring Test-TCP-0.16 ... OK
==> Found dependencies: Test::SharedFork
Fetching http://search.cpan.org/CPAN/authors/id/T/TO/TOKUHIROM/Test-SharedFork-0.11.tar.gz ... OK
Configuring Test-SharedFork-0.11 ... OK
Building and testing Test-SharedFork-0.11 for Test::SharedFork ... OK
Successfully installed Test-SharedFork-0.11
Building and testing Test-TCP-0.16 for Test::TCP ... OK
Successfully installed Test-TCP-0.16
Fetching http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/Filesys-Notify-Simple-0.06.tar.gz ... OK
Configuring Filesys-Notify-Simple-0.06 ... OK
Building and testing Filesys-Notify-Simple-0.06 for Filesys::Notify::Simple ... OK
Successfully installed Filesys-Notify-Simple-0.06
Fetching http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/File-ShareDir-1.02.tar.gz ... OK
Configuring File-ShareDir-1.02 ... OK
==> Found dependencies: Class::Inspector
Fetching http://search.cpan.org/CPAN/authors/id/A/AD/ADAMK/Class-Inspector-1.24.tar.gz ... OK
Configuring Class-Inspector-1.24 ... OK
Building and testing Class-Inspector-1.24 for Class::Inspector ... OK
Successfully installed Class-Inspector-1.24
Building and testing File-ShareDir-1.02 for File::ShareDir ... OK
Successfully installed File-ShareDir-1.02
Fetching http://search.cpan.org/CPAN/authors/id/M/MI/MIYAGAWA/Devel-StackTrace-AsHTML-0.09.tar.gz ... OK
Configuring Devel-StackTrace-AsHTML-0.09 ... OK
Building and testing Devel-StackTrace-AsHTML-0.09 for Devel::StackTrace::AsHTML ... OK
Successfully installed Devel-StackTrace-AsHTML-0.09
Building and testing Plack-0.9938 for Plack ... OK
Successfully installed Plack-0.9938

簡単ですね。