Mac OS X “Snow Leopard” (10.6) and Perl
Snow Leopard ships with multiple versions of Perl:
- 5.10.0 (64 bit)
- 5.10.0 (32 bit)
- 5.8.9 (32 bit)
The default Perl is 5.10.0 (64 bit). However you can change this to 32-bit Perl by setting the following ENV shell variable:
And to switch to 5.8.9 all you need is this ENV variable set:
Instead of setting these ENV variables in your Terminal sessions you can also make the change to the systems defaults:
- defaults write com.apple.versioner.perl Prefer-32-Bit -bool yes
- defaults write com.apple.versioner.perl Version 5.8.9
This is a interesting move by Apple and something which may come in very handy in the future.
As it stands at this moment though you probably want 5.10.1 (and beyond) because of issues with 5.10.0. So you will probably be looking down the compiling route anyway. Still it does give the future option of a local::lib possibility with the pre-installed Perl provided by Apple.
NB. I always recommend that you avoid installing modules with CPAN (shell) on OS provided Perl. Always stick to the OS provided package installer to update Perl & modules (which unfortunately for Mac’s means “zilch” 😦 Apple “Software Updater” may update Perl itself but no extra modules are provided above what Apple provides on top of core Perl)