App::highlightãplenv+cpanmã§ã¤ã³ã¹ãã¼ã«ãã¦ã¿ã
ãã®ã¹ã©ã¤ããè¦ã¦ä¾¿å©ãããªã®ã§ã¤ã³ã¹ãã¼ã«ãã¦ã¿ãï¼
http://www.slideshare.net/kaokun/apphighlight-londonpm-tech-meeting-july-2013
App::highlight ã¯ã³ãã³ãã©ã¤ã³ã§æå®ãããã¼ã¯ã¼ãã«è¦ãããè²ãä»ãã¦ãã¤ã©ã¤ããã¦ãããï¼
grepãã¦ã1è¡ãé·ãã¦è¦ããã£ãå ´æãçºè¦ããã®ã«è¦å´ãã¦ãããããªã±ã¼ã¹ã§é常ã«æãã¨æãããï¼
æ®æ®µã¯perlã使ã£ã¦ããªãã®ã§ï¼plenv + cpanm ã§ã·ã¹ãã ã®perlã¨ã¯ç¬ç«ã«ã¤ã³ã¹ãã¼ã«ããæé ã®ã¡ã¢ï¼
cpanmãã¤ã³ã¹ãã¼ã«ããã¾ã§ã¯ã»ã¼plenvのREADMEã®æé ã®ã¾ã¾ï¼
(1) plenv ãã¤ã³ã¹ãã¼ã«
ã¾ãã¯plenvæ¬ä½ã®ã¤ã³ã¹ãã¼ã«ï¼
$ git clone git://github.com/tokuhirom/plenv.git ~/.plenv $ echo 'export PATH="$HOME/.plenv/bin:$PATH"' >> ~/.zshrc $ source ~/.zshrc $ echo 'eval "$(plenv init -)"' >> ~/.bash_profile $ source ~/.zshrc
次ã«perl-buildãplenvã®pluginsãã£ã¬ã¯ããªã«cloneãã¦ããï¼
$ git clone git://github.com/tokuhirom/Perl-Build.git ~/.plenv/plugins/perl-build/
ããã§å¥½ããªãã¼ã¸ã§ã³ã®perlãã¤ã³ã¹ãã¼ã«ããæºåãæ´ã£ãï¼
(2) perl ãã¤ã³ã¹ãã¼ã«
ææã®ãã¼ã¸ã§ã³ã®perlãã¤ã³ã¹ãã¼ã«ããï¼
$ GREP_OPTIONS= plenv install 5.18.1 $ plenv rehash $ plenv global 5.18.1
ç°å¢å¤æ°GREP_OPTIONSãåå ã§makeã§å¤±æããå ´åãããã®ã§æ³¨æãå¿
è¦ï¼
ä»å以ä¸ã®æ§ãªè¨å®ã«ãªã£ã¦ãããmakeã§errorã¨ãªã£ãï¼
$ echo $GREP_OPTIONS --color=auto --exclude-dir=.hg --exclude-dir=.libs --exclude-dir=.deps --exclude-dir=.git --exclude-dir=.svn --exclude=\*.tmp --binary-files=without-match
ã¨ã©ã¼å 容ã¯ä¸è¨ã®éãï¼
$ plenv install 5.18.1 ...(çç¥)... make -f Makefile.old clean > /dev/null 2>&1 ../../miniperl "-I../../lib" "-I../../lib" Makefile.PL "INSTALLDIRS=perl" "INSTALLMAN1DIR=none" "INSTALLMAN3DIR=none" "PERL_CORE=1" "LIBPERL_A=libperl.a" Writing Makefile for AutoLoader ==> Your Makefile has been rebuilt. <== ==> Please rerun the make command. <== false make[1]: *** [Makefile] ã¨ã©ã¼ 1 make[1]: ãã£ã¬ã¯ã㪠`/home/masa21kik/.plenv/build/perl-5.18.0/cpan/AutoLoader' ããåºã¾ã make config PERL_CORE=1 LIBPERL_A=libperl.a failed, continuing anyway... Making all in cpan/AutoLoader make all PERL_CORE=1 LIBPERL_A=libperl.a make[1]: ãã£ã¬ã¯ã㪠`/home/masa21kik/.plenv/build/perl-5.18.0/cpan/AutoLoader' ã«å ¥ãã¾ã Skip ../../lib/AutoSplit.pm (unchanged) Skip ../../lib/AutoLoader.pm (unchanged) make[1]: ãã£ã¬ã¯ã㪠`/home/masa21kik/.plenv/build/perl-5.18.0/cpan/AutoLoader' ããåºã¾ã ./miniperl -Ilib make_ext.pl ext/B/pm_to_blib MAKE=make LIBPERL_A=libperl.a Making B (all) Running Makefile.PL in ext/B ../../miniperl -I../../lib Makefile.PL INSTALLDIRS=perl INSTALLMAN1DIR=none INSTALLMAN3DIR=none PERL_CORE=1 LIBPERL_A=libperl.a Can't locate ExtUtils/Constant.pm in @INC (you may need to install the ExtUtils::Constant module) (@INC contains: /home/masa21kik/.plenv/build/perl-5.18.0/cpan/AutoLoader/lib /home/masa21kik/.plenv/build/perl-5.18.0/dist/Carp/lib /home/masa21kik/.plenv/build/perl-5.18.0/dist/Cwd /home/masa21kik/.plenv/build/perl-5.18.0/dist/Cwd/lib /home/masa21kik/.plenv/build/perl-5.18.0/dist/ExtUtils-Command/lib /home/masa21kik/.plenv/build/perl-5.18.0/dist/ExtUtils-Install/lib /home/masa21kik/.plenv/build/perl-5.18.0/cpan/ExtUtils-MakeMaker/lib /home/masa21kik/.plenv/build/perl-5.18.0/dist/ExtUtils-Manifest/lib /home/masa21kik/.plenv/build/perl-5.18.0/cpan/File-Path/lib /home/masa21kik/.plenv/build/perl-5.18.0/ext/re /home/masa21kik/.plenv/build/perl-5.18.0/dist/Term-ReadLine/lib /home/masa21kik/.plenv/build/perl-5.18.0/lib .) at Makefile.PL line 2. BEGIN failed--compilation aborted at Makefile.PL line 2. 512 from ext/B's Makefile.PL at make_ext.pl line 430. Warning: No Makefile! make[1]: ãã£ã¬ã¯ã㪠`/home/masa21kik/.plenv/build/perl-5.18.0/ext/B' ã«å ¥ãã¾ã make[1]: *** ã¿ã¼ã²ãã `config' ã make ããã«ã¼ã«ãããã¾ãã. ä¸æ¢. make[1]: ãã£ã¬ã¯ã㪠`/home/masa21kik/.plenv/build/perl-5.18.0/ext/B' ããåºã¾ã make config PERL_CORE=1 LIBPERL_A=libperl.a failed, continuing anyway... Making all in ext/B make all PERL_CORE=1 LIBPERL_A=libperl.a make[1]: ãã£ã¬ã¯ã㪠`/home/masa21kik/.plenv/build/perl-5.18.0/ext/B' ã«å ¥ãã¾ã make[1]: *** ã¿ã¼ã²ãã `all' ã make ããã«ã¼ã«ãããã¾ãã. ä¸æ¢. make[1]: ãã£ã¬ã¯ã㪠`/home/masa21kik/.plenv/build/perl-5.18.0/ext/B' ããåºã¾ã Unsuccessful make(ext/B): code=512 at make_ext.pl line 490. make: *** [ext/B/pm_to_blib] ã¨ã©ã¼ 2 Installation failure: make at /home/masa21kik/.plenv/plugins/perl-build/bin/../lib//Perl/Build.pm line 280. ABORT
åè) http://masasuzu.hatenablog.jp/entry/20111027/1319730973
(3) cpanm ãã¤ã³ã¹ãã¼ã«
$ plenv install-cpanm $ plenv rehash
(4) App::highlight ãã¤ã³ã¹ãã¼ã«
$ cpanm install App::highlight $ plenv rehash
以ä¸ã®æé ã§ç¡äºã« App::highlight ã使ããããã«ãªã£ãï¼