æ´çããããã®ã¡ã¢ã
- ããããåé¡: ããã¸ã§ã¯ããã¨ã®ä¾åã¢ã¸ã¥ã¼ã«ã®ç®¡ç
- å ¨ç°å¢å ±éã§ã¤ã³ã¹ãã¼ã«ããã¨ã¢ã¸ã¥ã¼ã«ã®ãã¼ã¸ã§ã³ãåããããªã
- local::libãcartonã使ã£ã¦ããã¸ã§ã¯ãå°ç¨ã®ã¤ã³ã¹ãã¼ã«é åãä½ãã®ãè¯ã
- ãããå®è¡ããPerlã®ãã¼ã¸ã§ã³ãéãã¨åããªãã£ããããã
- ã ã£ããPerlãã®ãã®ãããã¸ã§ã¯ããã¨ã«ç®¡çããæ¹ã
- åä¸ã¢ã¼ããã¯ãã£ã®è¤æ°ãµã¼ãã«ãããã¤ããã¨ãã1ç®æã§ç°å¢ä½ã£ã¦ãã£ã¬ã¯ããªä¸¸ãã¨rsyncã§æ¸ãã
- ã¨ããããã§ããã¸ã§ã¯ãå°ç¨ã®Perlãperlbrewã§ã¤ã³ã¹ãã¼ã«ãã¦ä½¿ãã
- ãã«ãã«æéããã£ããããããã©ã¾ãæåã®ä¸åã ãã ãææ ¢
æé
æ¢ã«perlbrewèªä½ã¯æ¨æºã®æ¹æ³ã§ã¤ã³ã¹ãã¼ã«ãã¦ããã¦ãã¦ä½¿ãã¦ããã¨ããåæã§
$ cd <PROJECT_ROOT> $ export PERLBREW_ROOT=${PWD}/perl5 $ perlbrew init $ source ${PERLBREW_ROOT}/etc/bashrc $ perlbrew install 5.16.2
ã¿ãããªãããã§ããã¸ã§ã¯ããã£ã¬ã¯ããªå
ã«PERLBREW_ROOT
ç°å¢å¤æ°ãã»ããããç¶æ
ã§ã¤ã³ã¹ãã¼ã«ãããã¨ãã以ä¸ãä½æ¥ãã£ã¬ã¯ããªã¨ãã¦ã¤ã³ã¹ãã¼ã«ãã¦ãããã
ãã®å¾ãå®éã«ä½¿ãperlã«switchãããã¨ããã ãã©ãæ®éã«perlbrew switch
ãããã¨ã$HOME/.perlbrew/init
ã«è«¸ã
ã®ç°å¢å¤æ°æ
å ±ãæ¸ãè¾¼ã¾ãããã¨ã«ãªããä¸æããã¨æ®æ®µä½¿ã£ã¦ããperlbrewç¨ã®ç°å¢ãå£ãã¦ãã¾ããPERLBREW_HOME
ç°å¢å¤æ°ãã»ãããã¦ããã°ãã以ä¸ã«initãã¡ã¤ã«ãä½ã£ã¦ä½¿ãããã«ãã¦ãããã®ã§ãã»ãããã¦ããã
$ export PERLBREW_HOME=${PWD}/perl5 $ perlbrew switch 5.16.2
ããã§ããã¨ã¯<PROJECT_ROOT>/bin/env.sh
ã«
#!/bin/sh # require perlbrew if ! which perlbrew; then source ${HOME}/perlbrew/etc/bashrc fi # set environment for PROJECT_ROOT PROJECT_ROOT=$(dirname $(dirname $0)) PERLBREW_ROOT=${PROJECT_ROOT}/perl5 PERLBREW_HOME=${PROJECT_ROOT}/perl5 # use switched perl source ${PERLBREW_ROOT}/etc/bashrc exec "$@"
ã¨ãã£ãã·ã§ã«ã¹ã¯ãªãããç¨æãã¦ããã¦ãperl絡ã¿ã®ã³ãã³ãã常ã«ãããçµç±ãã¦ä½¿ãããã«ããã°ãããã¸ã§ã¯ãå ã§å®çµããç°å¢ã§åãããã¨ãã§ããã
$ perlbrew list perl-5.10.1 perl-5.12.4 * perl-5.14.2 perl-5.16.0 perl-5.16.1 perl-5.16.2 perl-5.17.3 perl-5.8.9 $ which perl <HOME>/perl5/perlbrew/perls/perl-5.14.2/bin/perl $ cd <PROJECT_ROOT> $ ./bin/env.sh perlbrew list * perl-5.16.2 $ ./bin/env.sh which perl <PROJECT_ROOT>/perl5/perls/perl-5.16.2/bin/perl $ curl -L cpanmin.us | ./bin/env.sh perl - App::cpanminus $ ./bin/env.sh which cpanm <PROJECT_ROOT>/perl5/perls/perl-5.16.2/bin/cpanm $ ./bin/env.sh cpanm --installdeps . $ ./bin/env.sh plackup
éçºæã«ã¯Procfileã«ããããã¤ç¨ã«ã¯daemontoolsã®runã¹ã¯ãªããã«env.sh
çµç±ã§ç«ã¡ä¸ããããã«æ¸ãã¦ããã¦ãããçµç±ã§ããç«ã¡ä¸ããªãããã«ãã¦ããã°ãã¹ãå°ãªããªãæ°ãããã