Came across a nice thing for perl today - perlbrew.pl. I liked the idea of isolated perl universes!
perlbrew is a tool to manage multiple perl installations in your
$HOME
directory. They are completely isolated perl universes. This approach has many benefits:- No need to run
sudo
to install CPAN modules, any more. - Try the monthly released new perls.
- Learn new language features.
- Test your production code against different perl versions.
- Leave vendor perl (the one that comes with OS) alone.
- Hacking perl internals.
- Just to keep up with fashion.
While the default is good enough, you may customize it to install to alternative places, or even let multiple users share the whole perlbrew environment.
Install perlbrew using cpan.
parinay@parinay-MXC051:~$ perlbrew init
Perlbrew environment initiated under ~/perl5/perlbrew
Append the following piece of code to the end of your ~/.bash_profile and start a
new shell, perlbrew should be up and fully functional from there:
source ~/perl5/perlbrew/etc/bashrc
For further instructions, simply run `perlbrew` to see the help message.
Happy brewing!
parinay@parinay-MXC051:~$ perlbrew available
perl-5.17.9
perl-5.16.2
perl-5.14.3
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
parinay@parinay-MXC051:~$
parinay@parinay-MXC051:~$ perlbrew install perl-5.16.2
Fetching perl-5.16.2 as /home/parinay/perl5/perlbrew/dists/perl-5.16.2.tar.bz2
Installing /home/parinay/perl5/perlbrew/build/perl-5.16.2 into ~/perl5/perlbrew/perls/perl-5.16.2
This could take a while. You can run the following command on another shell to track the status:
tail -f ~/perl5/perlbrew/build.log
Installed /home/parinay/perl5/perlbrew/build/perl-5.16.2 as perl-5.16.2 successfully. Run the following command to switch to it.
perlbrew switch perl-5.16.2
parinay@parinay-MXC051:~$ perlbrew switch perl-5.16.2
parinay@parinay-MXC051:~$ perl --version
This is perl 5, version 16, subversion 2 (v5.16.2) built for i686-linux
Copyright 1987-201
...
No comments:
Post a Comment