perl | CPAN を使ってモジュールをダウンロードする



# perl -MCPAN -e shell

Are you ready for manual configuration? [yes] 

CPAN build and cache directory? [/root/.cpan] 
Cache size for build directory (in MB)? [10] 
Perform cache scanning (atstart or never)? [atstart] 
Cache metadata (yes/no)? [yes] 
Your terminal expects ISO-8859-1 (yes/no)? [yes] 
File to save your history? [/root/.cpan/histfile] 
Number of lines to save? [100] 
Policy on building prerequisites (follow, ask or ignore)? [ask] 

Where is your gzip program? [/bin/gzip] 
Where is your tar program? [/bin/tar] 
Where is your unzip program? [/usr/bin/unzip] 
Where is your make program? [/usr/bin/make] 
Where is your links program? [/usr/bin/links] 
Where is your wget program? [/usr/bin/wget] 
Where is your ncftpget program? [/usr/local/bin/ncftpget] 
Where is your ftp program? [/usr/kerberos/bin/ftp] 
Where is your gpg program? [/usr/bin/gpg] 
What is your favorite pager program? [/usr/bin/less] 
What is your favorite shell? [/bin/bash] 

If you don't understand this question, just press ENTER.

Parameters for the 'perl Makefile.PL' command?
Typical frequently used settings:

    PREFIX=~/perl       non-root users (please see manual for more hints)

Your choice:  [] 
Parameters for the 'make' command?
Typical frequently used setting:

    -j3              dual processor system

Your choice:  [] 
Parameters for the 'make install' command?
Typical frequently used setting:

    UNINST=1         to always uninstall potentially conflicting files

Your choice:  [] 

Timeout for inactivity during Makefile.PL? [0] 

Your ftp_proxy?  
Your http_proxy?  
Your no_proxy?  

(1) Africa
(2) Asia
(3) Central America
(4) Europe
(5) North America
(6) Oceania
(7) South America
Select your continent (or several nearby continents) [] 2

(1) China
(2) Hong Kong
(3) India
(4) Indonesia
(5) Iran
(6) Israel
(7) Japan
(8) Malaysia
(9) Philippines
(10) Republic of Korea
(11) Russian Federation
(12) Saudi Arabia
(13) Singapore
(14) Taiwan
(15) Thailand
(16) Turkey
Select your country (or several nearby countries) [] 7

Select as many URLs as you like (by number),
put them on one line, separated by blanks, e.g. '1 4 5' [] 3 2 1

Enter another URL or RETURN to quit: [] 

cpan shell -- CPAN exploration and modules installation (v1.7601)
ReadLine support available (try 'install Bundle::CPAN')

cpan> install Jcode

cpan> install Bundle::LWP

cpan> q (終了する)




 # perl -MCPAN -e shell
cpan> install Bundle::CPAN (CPANモジュール自身をバンドルモードでアップデートする)
cpan> install MIME::Lite (MIME::Liteモジュールをインストールする)
cpan> q    (終了する)

 インストールの途中で、Do you want to install the HEAD alias? [n] と聞いてきたら、そのままリターンする。




例えば、mime で検索すると、MIME::Fast や MIME::Lite などインストール時のモジュール名称を正しく指定できる。