- $ zypper install patch
- $ zypper install gcc
- …
- yes, “perlbrew install” occasionally and too often needs “–force” and even “–notest“, don’t be too surprised! my “5.14.2” and also my “5.16.1” needed it
- …
- www.perlbrew.pl
- $ perlbrew
- $ perlbrew help
- http://search.cpan.org/perldoc?App::perlbrew – this one tells you, how to upgrade perlbrew:
$ export PERLBREW_ROOT=/opt/perlbrew
$ curl -kL http://install.perlbrew.pl | bash
# or maybe like this:
$ perlbrew self-upgrade
- https://metacpan.org/module/App::perlbrew
- https://metacpan.org/module/perlbrew : list-modules, how to migrate modules together with cpanm, …
- http://www.perl.org/pub/2010/03/testing-perl-5120-rc-1-with-appperlbrew.html (a little outdated)
- Perlbrew and my shebang line [Link]:
What to do after installing a new perl, that you consider your new stable perl?
$ perlbrew alias create perl-RELEASE stable
# resp.
$ perlbrew alias -f create perl-RELEASE stable
# use this shebang line with $PERLBREW_ROOT expanded [Link]:
#! $PERLBREW_ROOT/perls/stable/bin/perl$ perlbrew switch stable # this will be our usual starting point!!!
# but “perlbrew list-modules” does not work on such an alias, so “perlbrew use” to a non-alias before!
- Have a serious look at “$ perlbrew help” once in a while!!!
I decided to make use of $PERLBREW_ROOT, as I want to keep my home $HOME minimial, just data and scripts, no big files, they all go to other disks. And right, my home directory is on an encrypted partition, and this sort of stuff certainly does not get encrypted.
$ export PERLBREW_ROOT=/usr/local/perlbrew
Therefore my perlbrew is installed as:
/usr/local/perlbrew/bin/perlbrew
They suggest, that my $HOME/.bashrc should “source” their …/etc/bashrc, but for the time being I let my $HOME/.profile do this, as IMHO this is right place.
So actually this is according to best practices for shell programming the right way (for me) to do it, and now this code is of course included in my $HOME/.profile:
# for perl’s App::perlbrew :
export PERLBREW_ROOT=/usr/local/perlbrew # on my Linux boxes
export PERLBREW_ROOT=/sw/perlbrew # on my Mac box(es)
source $PERLBREW_ROOT/etc/bashrc
##export PATH=$PERLBREW_ROOT/bin:$PERLBREW_ROOT/perls/current/bin:${PATH}
path_prepend $PERLBREW_ROOT
path_prepend $PERLBREW_ROOT/perls/current
BTW: always “$ hash -r” after switching, so you avoid getting certain perl resp. perlbrew related error messages like this one and a few others (confusion of the right installation directory):
bash: …: No such file or directory
I successfully brewed 5.10.1 and 5.12.1 on openSUSE-11.2, but on OS X Snow Leopard I only brewed 5.12.1 successfully, brewing 5.10.1 failed.
To be continued …
Update 2011-10-16:
On my Mac running Lion I was able to perlbrew these releases of perl
- perl-5.15.3 and
- perl-5.14.2
- but not perl-5.12.4, 5.10.1, 5.8.9, 5.6.2
Looks like OS X got targeted as a serious platform for perl development only rather recently.
…
Update 2012-10-07: A historic note: I first looked into perlbrew in the context of “biz-JG”.