View Full Version : Why isn't Perl 5.10 on the Mac?
Jun 18, 2009, 02:05 PM
I've been interesting in learning Perl for some time now and finally got round to getting a book today (the Llama). The version of Perl used in the book is 5.10, but the version on the Mac is 5.8. 5.10 has been available for ages, so why haven't Apple updated yet? Is there any way I can get the latest version?
I also noticed that Python is out of date too. Do Apple hate programmers or something?
Jun 18, 2009, 02:27 PM
As far as Perl, Python, and a thousand other packages are concerned, Mac OS X is just another unix variant. If you don't know the unix programming environment of OS X, now would be a good time to learn.
Like any UNIX, you can always download and compile and install from the source whatever program or library you're interested in. Alternatively, you can install MacPorts or Fink which maintains a repository of thousands pre-compiled packages.
Jun 18, 2009, 03:20 PM
Just don't overwrite the system installed ones! Bad things can happen if you do and, even if it does work initially, really bad things will happen when Apple updates it.
Jun 18, 2009, 03:36 PM
In practice that's usually not a danger.
OSX provided binaries and libraries are in the root or /usr bin, lib, and libexec subtrees.
Compiling from source generally places things in the /usr/local/ subtree.
MacPorts places it in /opt/local/
Fink in /sw.
If it's executables you're dealing with, you'll just need to alias the command or modify your PATH environment variable accordingly.
Jun 18, 2009, 04:09 PM
Why isn't Perl a newer version?
Because Apple doesn't find it worthwhile to keep programming languages up-to-date with the latest version. After all they don't make any money from it except indirectly. They would rather pay programmers to work on their OS and other software that they sell for money.
Sun is the same way. They have a free repository of unix-type tools, but they don't keep those very up-to-date either. They are paying developers to fix mysql bugs since they sell support contracts for mysql.
This is just how open-source software can lack the monetary incentive of capitalism. (I realize one is often allowed to sell the software under most licenses, but must provide source code upon request and most people fear that they won't make back their development cost.)
Jun 18, 2009, 04:19 PM
Thanks for the replies people. After some extensive Googling I managed to update both Perl (using ActivePerl) and Python myself. Python was pretty easy; there's a download on the Python site and an optional script will create a .bash_profile for you. The ActivePerl took a bit more work (hence my need for extensive Googling). Although it installs fine, in order to use it properly from the Terminal you need to edit either a .profile or .bash_profile. After doing some searching (including how to view hidden files on Leopard) I managed to get it working. You learn something new every day I guess.
I guess I have to agree with what jpyc7 said above; also the fact that Mac's are marketed towards consumers as being something that "just works" and are easy to use. I guess there's very little financial incentive for Apple to keep these programming tools up to date.
Jun 18, 2009, 04:22 PM
Apple's usual practice in all of the "BSD-layer" programs is to only include (some) security patches for 10.x.x updates, but do a massive update of things for 10.x updates. So I would expect the latest version of Perl and Python to be in 10.6 (possibly not Python 3.0... since that has some time before the Python folks recommend it for production work).
There are two main arguments for this on Apple's side (the one that makes the decisions):
1) If they make large changes to things like this it makes third party developers jobs more difficult because they can't use the 10.x version as a marker for compatibility. And there are enough little odd differences between the versions of Perl and Python (in odd corners) that this makes a difference. And remember that there are a lot of things in both MacOS X and MacOS X Server themselves that depend on Perl, Python, and (newly) Ruby. So they would have to do intese validation on all of those as well. It is just easier for all concerned to not change the system versions except at large break points.
2) Trying to keep up with all of the packages that are constantly changing would be really difficult. Apple does a mediocre job of keeping up with security updates, but trying to keep up with everything is just not worth it.