Error message

Deprecated function: The each() function is deprecated. This message will be suppressed on further calls in menu_set_active_trail() (line 2404 of /usr/share/drupal7/includes/menu.inc).

[Note] perlbrew + cpanm + perl 5.12.0

本文轉載自 使用 perlbrew 來安裝 perl-5.12.0 跟 cpanm 的筆記 - FourDollars Blog

perlbrew 的好處就是可以使用一般使用者的權限來安裝 perl 跟其模組,不用擔心會破壞到原本系統的穩定性。

首先去抓 gugod 在 GitHub 上的 perlbrew 接者開始安裝 perl-5.12.0

git clone git://github.com/gugod/App-perlbrew.git
cd App-perlbrew
./perlbrew install
./perlbrew init
source ~/perl5/perlbrew/etc/bashrc
perlbrew install perl-5.12.0
perlbrew switch perl-5.12.0

然後去抓 miyagawa 在 GitHub 上的 cpanm 回來安裝

git clone http://github.com/miyagawa/cpanminus.git
cd cpanminus
./cpanm .

再回去用 cpanm 重新安裝一遍 perlbrew (因為第一次安裝時會少裝一些文件檔案)

cd App-perlbrew
cpanm .

以上步驟做完就可以有一個最簡單的 perl-5.12.0 的執行環境
之後使用前可以手動執行 source ~/perl5/perlbrew/etc/bashrc
或是直接把 source /.bashrc 裡面

P.S. 可以先將家目錄底下的 .cpan .cpanm .cpanplus 目錄都刪除掉 (或是更名就可以了) 再開始執行上面的步驟比較不會發生一些奇怪的問題

Add new comment