perlbrewを入れてみたメモ
perlbrewを入れてみたので、一通りの流れをメモしておきます。
$ curl -L http://xrl.us/perlbrewinstall | sh % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 1157 100 1157 0 0 307 0 0:00:03 0:00:03 --:--:-- 5643 ## Download the latest perlbrew ## Download the packed patchperl ## Installing perlbrew The perlbrew is installed as: ~/perl5/perlbrew/bin/perlbrew You may trash the downloaded /tmp/perlbrew from now on. Perlbrew environment initiated, required directories are created under ~/perl5/perlbrew Paste the following line(s) to the end of your ~/.bashrc and start a new shell, perlbrew should be up and fully functional from there: source ~/perl5/perlbrew/etc/bashrc For further instructions, simply run `perlbrew` to see the help message. Enjoy perlbrew at $HOME!! ## Installing patchperl ## Done.
インストール自体は、インストール用シェルスクリプトをダウンロードして実行するだけ。Fedora 15にはyumのupdatesリポジトリにperlbrewがあったりするけど、ちょっとバージョン古いし、変なところにインストールされるより、ホームディレクトリに入れた方が収まりが良さそうだったので使いませんでした。
+PERLBREW_VERSION=0.29 -PATH=/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/myuser/bin +PERLBREW_ROOT=/home/myuser/perl5/perlbrew +PATH=/home/myuser/perl5/perlbrew/bin:/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/myuser/bin +PERLBREW_HOME=/home/myuser/.perlbrew +PATH_WITHOUT_PERLBREW=/usr/lib64/ccache:/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/myuser/bin +PERLBREW_PATH=/home/myuser/perl5/perlbrew/bin
インストール直後に~/.bashrcにsource ~/perl5/perlbrew/etc/bashrc
を追記するように指示が書いてあるのでその通りにします。上記は、この~/perl5/perlbrew/etc/bashrc
を読む前と読んだ後の、printenv
をdiffしたものです。
インストール後に確認した事
$ cat .perlbrew/init export PERLBREW_VERSION=0.29 export PERLBREW_PATH=/home/myuser/perl5/perlbrew/bin export PERLBREW_ROOT=/home/myuser/perl5/perlbrew
~/perl5/perlbrew/etc/bashrc
から.perlbrew/init
が呼ばれ、環境変数を設定しているみたい。
$ which perlbrew ~/perl5/perlbrew/bin/perlbrew $ perlbrew version /home/myuser/perl5/perlbrew/bin/perlbrew - App::perlbrew/0.29 $ perlbrew available perl-5.15.3 perl-5.14.2 perl-5.12.4 perl-5.10.1 perl-5.8.9 perl-5.6.2 perl5.005_04 perl5.004_05 perl5.003_07 $ perlbrew list * /usr/bin/perl (5.12.4)
パスとかバージョンとか、perlbrewがインストールできるperlのバージョンとか。
$ perlbrew install perl-5.12.4 Fetching perl-5.12.4 as /home/myuser/perl5/perlbrew/dists/perl-5.12.4.tar.gz Installing /home/myuser/perl5/perlbrew/build/perl-5.12.4 into ~/perl5/perlbrew/perls/perl-5.12.4 This could take a while. You can run the following command on another shell to track the status: tail -f ~/perl5/perlbrew/build.log Installed /home/myuser/perl5/perlbrew/build/perl-5.12.4 as perl-5.12.4 successfully. Run the following command to switch to it. perlbrew switch perl-5.12.4
perlbrewでのperlのインストールは、こんな感じです。ビルドログをずらずらと出さずに、見たかったらtail -f
で見させるってのは、ログが流れないのでその後の指示を見逃したりしなくて、いい感じ。