2016年11月18日金曜日

Use CPAN Install a module in to Perl モジュールのインストール

Perlに必要なモジュールをインストールには、CPANを使います。

Fedora 24であれば、以下のコマンドを使います。
 $dnf install perl-CPAN

ただし、なぜか以下のようにperl-Test-Simpleをインストールしておかないと、Perlの基本モジュールとされるTest::Moreがないことになってしまいます。Test::MoreはまたStorableに依存しているようで、Cirucular Dependancyになって、CPANをインストールするだけでは、どんなモジュールでもインストールできません。
 $dnf install perl-Test-Simple

これで、さらにcpanminusというcpanmをインストールすれば、完璧です。
  $cpan cpanminus

2016年8月4日木曜日

How to install perl in a local directory

1. Go to http://www.cpan.org/src/README.html to get the source code of desired version

2.  ./Configure -des -Dprefix=$HOME/localperl

3.  make test

4.   make install