On Fri, Jun 10, 2011 at 2:27 PM, Jan Dubois <j...@activestate.com> wrote:
> On Fri, 10 Jun 2011, Sherm Pendley wrote:
>> Yes, but since .profile is evaluated later, whatever it does will
>> override what's set in the plist. Thus, changes in the plist will have
>> no effect on shell sessions that set the same variable.
>
> I use this line in my .bash_profile to make sure I use the
> same PATH everywhere (and only have to edit it in one place):
>
> export PATH=`/usr/libexec/PlistBuddy -c 'Print :PATH' 
> ~/.MacOSX/environment.plist`
>
> The same can be done for PERL5LIB.

It can be - and I've copied that into my Collection of Handy Stuff. :-)

But the question is, should it be done for PERL5LIB? That affects
*all* Perls, and if you've included the path to modules compiled for
(say) 5.12, but you're running 5.10, those modules won't work.

That's exactly the problem that bit Fink some time ago - their init.sh
used PERL5LIB to add their Perl module directories, which had modules
they'd compiled with 5.6 - when Apple then released a version of Mac
OS X that used Perl 5.8.1, those Fink-provided modules no longer
worked. There was much wailing and gnashing of teeth over Fink
"breaking Apple's Perl," but in fact they didn't do that; they hadn't
touched Apple's Perl at all, they had simply told *all* Perls to look
for modules that only some Perls would be able to use.

sherm--

-- 
Cocoa programming in Perl:
http://camelbones.sourceforge.net

Reply via email to