Messed up Perl
hal at halblog.com
Mon Oct 4 12:21:09 PDT 2010
On Oct 4, 2010, at 2:04 PM, Brandon S Allbery KF8NH wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> On 10/3/10 19:11 , Hal Vaughan wrote:
>> So, if I understand, MacPorts basically says, "I'm so important that I'm going to override your default settings and take over Perl for your entire system." Isn't that about the case? (I'm commenting on that issue in MacPorts, I hope it doesn't sound like it's directed at you.)
> Other way around: MacPorts modifies your personal $PATH to point to itself,
> specifically so that the system continues to use the system's Perl.
> As to "taking over", if you don't want to use MacPorts then why did you
> install it in the first place?
There is so much wrong with that question I don't know where to start.
Wanting to use MacPorts does NOT mean I want to use it for EVERYTHING. There's no need to user the MacPorts Perl, Python, or anything else that may already be installed on my iMac and is working fine. If it ain't broke, don't fix it.
> It's entirely reasonable to assume that
> someone who has installed MacPorts wants MacPorts programs to be available
> in their $PATH.
You've missed a major point: These programs are OVERRIDING what's already there. That's my objection.
> If you want to change *where* it is in your $PATH, then
> edit the PATH= line in ~/.profile.
Yes, I'll be doing that. My issue there is that MacPorts PREPENDS their paths to PATH, instead of APPENDING them, making one use MacPorts programs by default, OVER OS X programs that were already there and doing just what I wanted them to do.
> Perl and other scripts, on the other
> hand, should always specify exactly which interpreter they want in their #!
> lines, because you may have several installed versions of a given
> interpreter even with just the base OSX system, let alone
> MacPorts/Fink/whatever. (Get Info on *.py scripts on my SL iMac shows
> several instances of "Python Runner", apparently installed as part of XCode.
> I imagine at least some of those are backed by their own separate python
Yes, for the most part that works, but when you specify "#!/usr/bin/perl," and need modules so you run CPAN, there's no reason, unless you've read ALL the info on MacPorts (which I can't do, since I have a life that, as often as possible, involves being someplace that is NOT sitting in front of my computer). If I run cpan, without prefacing it with "/usr/bin/", I should be able to count on it being the default executable, not one that has been doctored.
As best I can remember, at no place, when installing anything, did MacPorts warn me, "Hey, guy, we're usurping your defaults by putting our path BEFORE yours, so you'll always run our stuff over the defaults now."
More information about the macports-users