tags:

views:

191

answers:

1

I want to create Perl scripts that run on older OS X machines as well as on current versions. Is there a list or a resource where I can find out which Perl versions were distributed with older Mac OS X Versions (10.0 to 10.6)?

+10  A: 

I'm sure there is some online resource to find this, probably at Apple Development Connection

However I have three machines to hand which show me that /usr/bin/perl versions are:

  • 5.8.6 on 10.4 (Tiger)
  • 5.8.8 on 10.5 (Leopard)
  • 5.10.0 on 10.6 (Snow Leopard)

In all cases these are thread enabled.

Starting from Snow Leopard, multiple versions of perl are supported under the hood and it also comes with Perl 5.8.9 which you can switch to like so:

defaults write com.apple.versioner.perl Version 5.8.9

Also note that 5.10.0 on Snow Leopard is 64-bit. You can switch to 32-bit by using following:

defaults write com.apple.versioner.perl Prefer-32-Bit -bool yes

/I3az/


Update:

A full list of Perl source code that Apple has compiled with Mac OS X can be found on their Perl opensource page.

Working out what the packaging version numbers mean and how they refer to each version of Mac OS X may take some effort. However each package does show which Perl was compiled with the options, patches & extra modules Apple applied to it.

See Perl and Mac OS X versions for my best stab at working all this out.

draegtun
great! thanks for your info. they don't update the major numbers with software update don't they?
z3cko
Nope and I haven't noticed them making minor version updates (though they may backport security changes?).
draegtun
BTW... On a side note (seeing some other related questions you've asked), do not use CPAN installer with the OSX installed Perl (or for any installed/packaged Perl). see http://stackoverflow.com/questions/1992720/perl-strategy-for-a-new-snow-leopard-user/1992934
draegtun
thanks for the pointer! i don't :)
z3cko
Steve Jobs would never have allowed Perl to be available on OSX. This is clearly faulty information.
Dave
@draegtun: do you know for 10.0 - 10.3 as well?
z3cko
Amazingly I still have an old clamshell iBook hanging around running 10.1 (Puma)! It reports that it has Perl 5.6.0
draegtun
And from memory I think 10.3 (Panther) had Perl 5.8.1
draegtun