m_shige1979のときどきITブログ

プログラムの勉強をしながら学習したことや経験したことをぼそぼそと書いていきます

Github(変なおっさんの顔でるので気をつけてね)

https://github.com/mshige1979

Perl6のインストールを試す

環境

vagrantのCentOS6.x

インストール

git clone https://github.com/rakudo/rakudo.git
cd rakudo/
perl Configure.pl --prefix=$HOME/perl6 --gen-moar --gen-nqp --backends=moar
make
make install

バージョン確認

$ $HOME/perl6/bin/perl6 -v
This is perl6 version 2015.07.1-160-gb56d593 built on MoarVM version 2015.07-57-gec051f5
$

環境変数に追加

echo 'export PATH=$PATH:$HOME/perl6/bin' >> ~/.bash_profile
source ~/.bash_profile

サンプル実行

sample.pl
say "hello world";
say "aaaaaaa";

$ perl6 sample1.pl
hello world
aaaaaaa
$

make testはできなかった

[vagrant@localhost rakudo]$ make test
/usr/bin/perl t/harness --moar t/01-sanity t/04-nativecall
Can't locate Test/Harness.pm in @INC (@INC contains: /usr/local/lib64/perl5 /usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5 .) at t/harness line 14.
BEGIN failed--compilation aborted at t/harness line 14.
make: *** [m-coretest] エラー 2
[vagrant@localhost rakudo]$

※なんか必要だったみたいだけどインストールはできたので保留


perl6の構文の書き方はまた別途見てみる