perl5.8 problem?
Kurt Hillig
khillig at umich.edu
Thu Jul 10 10:21:44 PDT 2008
Perl uses '@INC' to hold the list of directories to be searched for
modules that you might use; the default '@INC' in the MacOSX native Perl
(on my 10.4 box) is:
/System/Library/Perl/5.8.6/darwin-thread-multi-2level
/System/Library/Perl/5.8.6
/Library/Perl/5.8.6/darwin-thread-multi-2level
/Library/Perl/5.8.6
/Library/Perl
/Network/Library/Perl/5.8.6/darwin-thread-multi-2level
/Network/Library/Perl/5.8.6
/Network/Library/Perl
/System/Library/Perl/Extras/5.8.6/darwin-thread-multi-2level
/System/Library/Perl/Extras/5.8.6
/Library/Perl/5.8.1/darwin-thread-multi-2level
/Library/Perl/5.8.1
When you install the MacPorts Perl, you get a different @INC (as your
messages shows); but Files.pm isn't in any of those locations.
I'm no Perl expert, but one workaround is to do something like this to
your code:
use lib '/Library/Perl/5.8.6/darwin-thread-multi-2level/Mac';
use Files;
(at least on my box, that's where I found Files.pm)
Dr. Kurt Hillig
UMNet Administration I always tell the Fax (734)763-4050
University of Michigan absolute truth, Phone (734)647-8778
Ann Arbor, MI 48105-3640 as I see it. EMail khillig(at)umich.edu
> Computers were invented to help people waste more time faster <
On Thu, 10 Jul 2008, Shawn Protsman wrote:
> I was using the OS X version of Perl and haven't had any issues. Then
> I installed git-core which has a perl5.8 dependency. Now that the
> Macport perl5.8 is on my system I cannot run some of my perl programs.
> Here is an example:
> @naiad ~/workspace/aestTest] ./aestTest --CbcDec
> Can't locate Mac/Files.pm in @INC (@INC contains: /opt/local/lib/
> perl5/5.8.8/darwin-2level /opt/local/lib/perl5/5.8.8 /opt/local/lib/
> perl5/site_perl/5.8.8/darwin-2level /opt/local/lib/perl5/site_perl/
> 5.8.8 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl/
> 5.8.8/darwin-2level /opt/local/lib/perl5/vendor_perl/5.8.8 /opt/local/
> lib/perl5/vendor_perl .) at /opt/local/lib/perl5/site_perl/5.8.8/File/
> HomeDir/Darwin.pm line 34.
>
> Next, I try to start cpan to install Mac::Files:
>
> @naiad ~/workspace/aestTest] cpan
> CPAN: File::HomeDir loaded ok (v0.80)
> Can't locate Mac/Files.pm in @INC (@INC contains: /opt/local/lib/
> perl5/5.8.8/darwin-2level /opt/local/lib/perl5/5.8.8 /opt/local/lib/
> perl5/site_perl/5.8.8/darwin-2level /opt/local/lib/perl5/site_perl/
> 5.8.8 /opt/local/lib/perl5/site_perl /opt/local/lib/perl5/vendor_perl/
> 5.8.8/darwin-2level /opt/local/lib/perl5/vendor_perl/5.8.8 /opt/local/
> lib/perl5/vendor_perl /Users/sprotsman/workspace/aestTest) at /opt/
> local/lib/perl5/site_perl/5.8.8/File/HomeDir/Darwin.pm line 58.
>
> Uhg! I'm running Mac OS 10.5.4 and Macports 1.6.0. Any help is much
> appreciated.
> _______________________________________________
> macports-users mailing list
> macports-users at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macports-users
>
> !DSPAM:48763f32215491510311687!
>
>
>
>
More information about the macports-users
mailing list