Reforming my Mac – Part 2

I finally got `perlbrew` installed. It’s a utility like `rvm` that allows you to manage multiple installations of perl without clobbering your system files. I followed the instructions from here:

1) Run curl -L | bash

Just a fancy way of getting the install script and running it.

2) Run /Users/bob/perl5/perlbrew/bin/perlbrew init

Your home directory will vary, but this will setup perlbrew to work with your shell. At the end of this process there will be instructions on adding this to your .bashrc or .bash_profile.

3) Add “source /Users/bob/perl5/perlbrew/etc/bashrc” to the end of ~/.bash_profile

I don’t have a .bashrc, and I know there is some subtle difference between the two files but they are both run when you start a shell.

4) Run perlbrew install perl-5.12.3

There were actually two failing tests on my machine, so I had to run it with –force. Also, this command will not show the progress of the install, so if you want to follow along you’ll have to open up another terminal and tail the output of the build log.

5) perlbrew switch perl-5.12.3

This selects 5.12 as your current perl.

6) perlbrew install-cpanm

This will install CPANM. I recommend using it over regular CPAN and CPANPLUS.

7) cpanm Test::More

This installs Test::More. Note you don’t need to type `cpanm install Test::More` as this will install a module named “install”. I have yet to run into a module that will not install in cpanm but will install in CPAN.

I can now switch between my system CPAN (which is 5.10.0 on my Mac) and the 5.12.3 that I installed. Another good feature of perlbrew is that it does not require sudo permissions to install, and keeps all of the installed files in your home directory.

Posted in Uncategorized | Comments Off on Reforming my Mac – Part 2

Comments are closed.