Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: Are there any major Perl issues with Mac OS X Lion?

by sundialsvc4 (Abbot)
on Sep 06, 2011 at 17:32 UTC ( #924438=note: print w/replies, xml ) Need Help??

in reply to Are there any major Perl issues with Mac OS X Lion?

Yes, the Lion OS does advance the installed Perl version, as is to be expected.

What I do is this:   if the installed Perl is not acceptable to me, or if I need more than one version for testing purposes or what-have-you, I install them from-source into /usr/local/bin and make sure that the desired $PATH is set up in my .bash_profile.   Just as with any ordinary Unix or Linux.   Point being, I never touch the actual version that comes with any operating-system, because I don’t want to screw-up any system tools, vendor-provided updates and so on, “Lion or not, Mac or not.”

As for CPAN et al, it is strictly “same song, next verse.”   I apply all of the techniques used for “installing Perl as a non-root user” to set up my own private PERL5LIB-referenced directory into which all of “my” CPAN modules and/or module-versions are installed.   I set up my own (non administrative) “software maintenance” account, which, being an ex-VMer, I usually call maint.   This is the user with read/write access to the directory in which I do the CPAN work (as well as /usr/local/bin), and it is the account that actually does all of it.   (By design, it is not an Administrative user and has no special power, but it is the sole owner of all these things and it is the only one, other than root of course, who can affect them.)

When you do it this way, it no longer matters if you are running Lion or not, and you don’t have to worry about things breaking when you do upgrade the OS.   As I said, I do this for OS/X, for any Unix, and for any Linux.   I just pretend that my computer is a shared-hosting web server someplace (else), and do what I would (be obliged to) do there.

I have elected to wait to install Lion until shortly after Christmas.   “Computer software like fine wine ... let it age.”   This would not, however, dissuade me from purchasing a Macintosh with that OS installed upon it right now, if I deemed that I needed such a machine right now.

With regard to your questions about Win32:: and so-forth, Perl does know what kind of operating system it is running on.   (Try perl -V with a capital “V.”)   CPAN module installers will use this information to keep you from doing anything meaningless ... like installing Win32-specific support on a non-Win32 machine like a Mac, or AS400 specific modules on a non-AS400, and so on and on.   Perl is engineered from the ground up to recognize multiple operating environments, and most ... :-D ... of the time it Does The Right Thing.™   It’s entirely up to your own good engineering judgment how platform-specific you wish to be.   Platform-specific modules are more finely tailored to the needs of a particular platform and give-up portability altogether.   During your project engineering sessions, (of course) prior to implementation, you must make your own decision.

  • Comment on Re: Are there any major Perl issues with Mac OS X Lion?

Replies are listed 'Best First'.
Re^2: Are there any major Perl issues with Mac OS X Lion?
by kcott (Chancellor) on Sep 06, 2011 at 22:15 UTC

    Thanks for the Perl installation details, sundialsvc4. I would generally agree with your let it age policy; however, Lion seems to be the OS I'll get with the new hardware - perhaps I'll need a few updates as it matures. Win32:: was intended to be an example of something I didn't expect to work: while I know it's not the case, if Tk:: modules, for instance, weren't going to work then that would be something I'd like to know up front (more of a platform-exclusion than a platform-specific question).

    -- Ken

Re^2: Are there any major Perl issues with Mac OS X Lion?
by Anonymous Monk on Feb 10, 2012 at 06:56 UTC
    Hi sundialsvc4 : it's been a few months but I wonder if you can help please? I want to use my own version of perl on Snow Leopard, so that CPAN etc. don't interfere with the pre-installed perl. (I've been using and CPANing the sys version over the last 4 years w/o incident, but I'd prefer to have my own perl to be on the safe side.) I downloaded and compiled perl 5.14 and that looks ok using it from batch - I just set my $PATH to see it first. However, I've been unable to get user _www to run cgi using the new version. I've tried editing apache's plist and/or setting up a plist in /Library/WebServer (which according to dscl is _www's home dir), restarting apache, restarting the whole machine. I've put a line in my cgi code to output $^V and it still says 5.10 (sys version which came with SL.) I've also Don't know if you could suggest anthing pls? TIA, Terry
      Hi sundialsvc4 - hmm, the perl version can be changed by changing the shebang, to e.g. /usr/local/bin/perl - I was hoping for a way to override that, or I'll have to change it when I check stuff out then remember to change it back before I check stuff in (live server is linux). So it could be just a nuisance, not a show stopper. Thanks, Terry.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://924438]
[Corion]: "Unmatched ) in regex; marked by <-- HERE in m/(&#9583;&# 9633;)&#9583;&# 65077; &#9531;&#9473;&# 9531;) <-- HERE / at -e line 1." :)
[Corion]: Meh - my "flip the table" string doesn't render here ;)
[choroba]: It renders correctly in pm-cb-g
[erix]: heh
[Veltro]: is it a question?
[erix]: or a conundrum?

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (8)
As of 2018-07-17 16:08 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (372 votes). Check out past polls.