Saturday, December 21, 2013

Install Perlbrew

1. Install the Perlbrew

Install development tools.
yum groupinstall "Development Tools"
yum install wget lynx ncftpget ncftp ftp gpg patch applypatch


Copy & Paste this line into your terminal:
\curl -L http://install.perlbrew.pl | bash
 
Or, if your system does not have curl but something else:
# Linux
\wget -O - http://install.perlbrew.pl | bash

# FreeBSD
\fetch -o- http://install.perlbrew.pl | sh
 
If you prefer to install with cpan, there are two steps:
sudo cpan App::perlbrew
perlbrew init 
If it is installed with cpan, the perlbrew executable should be installed as /usr/bin/perlbrew or /usr/local/bin/perlbrew. For all users who want to use perlbrew, a prior perlbrew init needs to be executed.

The default perlbrew root directory is ~/perl5/perlbrew, which can be changed by setting PERLBREW_ROOT environment variables before the installation and initialization. For more advanced installation process, please read the perlbrew document.

export PERLBREW_ROOT=$HOME/perl5/perlbrew
export PERLBREW_HOME=$PERLBREW_ROOT
export PATH=$PATH:$PERLBREW_HOME/bin


2. Check available Perl distribution.

[catalyst@catalyst ~]$ perlbrew available
  perl-5.19.7
  perl-5.18.1
  perl-5.16.3
  perl-5.14.4
  perl-5.12.5
  perl-5.10.1
  perl-5.8.9
  perl-5.6.2
  perl5.005_04
  perl5.004_05
  perl5.003_07



3. Install Perl distribution


perlbrew install-multiple  perl-5.6.2 perl-5.8.9 perl-5.10.1 perl-5.12.5 perl-5.14.4 perl-5.16.3 perl-5.18.1 perl-5.19.7




4. Configure the shell variables : perlbrew.sh


update_for_perlbrew() {
   local name="$( perlbrew list | perl -lane'print $F[1] if /^\*/' )"

   if [ -z "$name" ]; then
      name="$( perl -e'$v = $^V || $]; $v =~ s/^v//; print $v' )"
   fi

   # Adjust window title here

   echo "[$name]"
}


PS1='$( update_for_perlbrew ) \u@\h \W$ [ \! ]>> : '

alias ll="ls -l"
alias lla="ls -al"










No comments:

Post a Comment