俺です。
普段は制約がない限りAmazon Linux latest versionを使っています。
Amazon Linux 2015.09ではPerl 5.16.3が利用できるのですが、
深遠な理由があってPerl 5.10系が必要になったので、plenvを導入しました。
準備
検証機なのでgroupinstall...
$ sudo yum groupinstall -y "Development Tools"
plenv+perl-buildの準備
$ git clone git://github.com/tokuhirom/plenv.git ~/.plenv
$ git clone git://github.com/tokuhirom/Perl-Build.git ~/.plenv/plugins/perl-build
$ echo 'export PATH=~/.plenv/bin:~/.plenv/shims/:$PATH' >> ~/.bashrc
$ echo 'eval "$(plenv init -)"' >> ~/.bashrc
$ $SHELL -l
perl 5.10.1のインストール
$ plenv install -l
awk: コマンドライン:1: 致命的: ファイル `/home/ec2-user/.plenv/version' を読み込むために
開けません (そのようなファイルやディレクトリはありません)。
Available versions:
..省略..
5.10.0
5.10.1
..省略..
$ plenv install 5.10.1
$ plenv local 5.10.1
$ perl -v
This is perl, v5.10.1 (*) built for x86_64-linux
(with 1 registered patch, see perl -V for more detail)
Copyright 1987-2009, Larry Wall
Perl may be copied only under the terms of either the Artistic License or the
GNU General Public License, which may be found in the Perl 5 source kit.
Complete documentation for Perl, including FAQ lists, should be found on
this system using "man perl" or "perldoc perl". If you have access to the
Internet, point your browser at http://www.perl.org/, the Perl Home Page.
$ plenv version
5.10.1 (set by /home/ec2-user/.perl-version)
付録
- ansible
gitとpatch, readline-develは事前に入れておきましょう。
最高のGist発見
やったね