Re: Adding to @INC

[email protected] (Adam Witney)
Newsgroups perl.macosx
Message-ID <[email protected]>
On 7 Jan 2009, at 15:24, Vic Norton wrote:

> I just installed Mac OS X 10.5, and I'm trying to get Perl back up  
> to snuff. My current @INC contains only
>  /System/Library/Perl/5.8.8/darwin-thread-multi-2level
>  /System/Library/Perl/5.8.8
>  /Library/Perl/5.8.8/darwin-thread-multi-2level
>  /Library/Perl/5.8.8
>  /Library/Perl
>  /Network/Library/Perl/5.8.8/darwin-thread-multi-2level
>  /Network/Library/Perl/5.8.8 /Network/Library/Perl
>  /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level
>  /System/Library/Perl/Extras/5.8.8 /Library/Perl/5.8.6
>  /Library/Perl/5.8.1/darwin-thread-multi-2level
>  /Library/Perl/5.8.1
>
> I plan to use CPANPLUS to install new packages and modules. Right  
> now it installs them in
>  /opt/local/lib/perl5/site_perl/5.8.8
> This seems like a good place, but how can I add this directory to  
> @INC? I would prefer not having to start every script with
>  use lib '/opt/local/lib/perl5/site_perl/5.8.8';

Try adding this to your ~/.profile

export PERL5LIB=${PERL5LIB}:/opt/local/lib/perl5/site_perl/5.8.8
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.