Recent Changes - Search:

Site

Perl?

System?

Legacy Notes?

edit SideBar

Perlbrew

Contents(:toc:)


(:num:)

Introduction

This article details how to manage a recent perl in your homedir. The main advantage is that you will never mess up your distribution's perl again with cpan updates of some key modules.

Perlbrew installation

  • First install perlbrew using cpan on the system perl : sudo cpan App::perlbrew
  • An alternative method is to get a more recent perlbrew from metacpan. I had to do this to accomodate the system perl update to 5.16 on my gentoo systems : wget, untar, perl Makefile.PL, make, sudo make install.

Perlbrew configuration

  • Choose where to install your perls : export PERLBREW_ROOT=$HOME/.perl5 && mkdir -p $PERLBREW_ROOT
  • Make this choice persistent by appending the following to your .bashrc :
    if [ -d "$HOME/.perl5" -a -f "$HOME/.perl5/etc/bashrc" ]; then
        export PERLBREW_ROOT=$HOME/.perl5
        source $HOME/.perl5/etc/bashrc
    fi
  • Init perlbrew :
    perlbrew init
    perlbrew install-cpanm
    perlbrew install-patchperl

Manage your perls with perlbrew

  • Use perlbrew available to list available perls
  • Install with perlbrew install.
  • Switch to your new perl with perlbrew switch

(:nonum:)

References

Edit - History - Print - Recent Changes - Search
Page last modified on December 29, 2013, at 10:28 PM