macshaggy has asked for the wisdom of the Perl Monks concerning the following question:

I'm currently working on Mac OS X 10.4, and I have installed 5.8.8 into the /usr/local/bin of my system so as not to touch the original install of perl (5.8.6). I install all my libraries into /usr/local/lib/perl5. I have set up my PERL5LIB to point to this location. I use Emacs 21.1.50.1 installed with the Carbon libs. I use the cperl mode and have noticed that the perldb points to the 5.8.6. And it can't find the modules I loaded into /usr/local/lib/perl5.

I directed .bashrc .profile .login files to setup /usr/local/bin & /usr/local/lib.

And it appears that it is coming from cperl. How can I change this so that it will find my libraries instead of checking OS X's factory installed Perl?


Any help would be great.

Thanks

UPDATE: I just found this article on Apple Developer Technical Q&A QA1067 - it's all about setting environment variables for Finder. And I can confirm that it works perfectly.

Replies are listed 'Best First'.
Re: cperl mode and interpreter choice
by snoopy (Curate) on Oct 16, 2007 at 03:06 UTC
    Are you running emacs from Mac OS X Finder? Some suggestions:

    Finder may not be picking your environment variables. Try this from within emacs to verify this:

    M-x: shell-command shell-command: echo path=$PATH
    You could by-pass Finder and run emacs from the shell:
    bash:$ export PATH=/usr/local/bin:$PATH; bash:$ /Applications/Emacs.app/Contents/MacOS/Emacs &