Apple recommends installing your own perl (or python or ruby) for your private development to not interfere with the work the bundled perl (or python or ruby) does. In Item 110. Compile and install your own perls. we recommended the same thing.
In their System Integrity Protection Guide under “File System Protections”, they recommend:
Developers using Perl, Python, Ruby, or any other scripting languages that ship with OS X, are encouraged to manage their own installations of the language and dependencies in /usr/local/. When distributing programs written with a scripting language, developers are encouraged to bundle the language runtime and any required components into a self-contained binary.
They also note that you shouldn’t be mucking around under /usr unless you are playing in /usr/local. That’s not really news to anyone though, and many people prefer to completely stay out of /usr.
On my development machines, I install several perls and make links to all of them in my personal ~/bin directory as I described in Make links to per-version tools. Some people use perlbrew or plenv to do the same sort of thing, although those tools install everything in your personal directory by default. David Golden writes about this setup in Setting up a Perl Development Environment with plenv.
2 thoughts on “Apple recommends installing your own perl”
For a Mac OS X app where a Perl script (Markdown.pl) will be invoked, I need to know if all Mac OS X 10.6 and later installations have Perl installed be the default. Otherwise, we’ll have to package it with the app. Is this confirmed, can I safely assume it?
No one can guarantee anything. Apple could change their minds at any time. So far they haven’t.
Comments are closed.