Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / Perl / January 2007



Tip: Looking for answers? Try searching our database.

Strange problem with @INC

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jesse Engel - 09 Jan 2007 23:24 GMT
for some reason, X11 has a different version of @INC than reported with apple's terminal. if i run

perl -e 'foreach (@INC) { print "$_\n";}' with apple_terminal, i get

/sw/lib/perl5/5.8.1/darwin-thread-multi-2level
/sw/lib/perl5/5.8.1
/sw/lib/perl5/darwin-thread-multi-2level
/sw/lib/perl5
/sw/lib/perl5/darwin
/System/Library/Perl/5.8.1/darwin-thread-multi-2level
/System/Library/Perl/5.8.1
/Library/Perl/5.8.1/darwin-thread-multi-2level
/Library/Perl/5.8.1
/Library/Perl
/Network/Library/Perl/5.8.1/darwin-thread-multi-2level
/Network/Library/Perl/5.8.1
/Network/Library/Perl
.

however, under xterm with the same command i get only the lines listed below /sw/lib/perl5/darwin
(in the above example).
i understand that i can have 'use lib "/foo/bar"' but it would be nice to have consistency. Also,
printenv returns less values in X11 than in apple_terminal. any ideas why?

tia,

jesse

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
Jay Savage - 10 Jan 2007 00:00 GMT
> for some reason, X11 has a different version of @INC than reported with apple's terminal. if i run
>
[quoted text clipped - 23 lines]
>
> jesse

Jesse,

It looks like you upgraded your Perl to 5.8 using fink instead of
installing it manually. Fink installed to /sw and then updated the rc
file (.cshrc, .profile, etc.) for your login shell to source a file
that, among other things, adds "/sw/bin" to your path and $PERL5LIB.
When you launch from X-11, though, none of the Fink files get sourced
and $PERL5LIB doesn't get set.

You'll need to either source the fink rc file, run your scripts from
the terminal, or install Perl to a standard location instead of the
Fink /sw tree.

The easiest thing would probably be to fink initialization stuff to
your ~./xinitrc. Google .xinitrc for all the gory details.

HTH,

-- jay
--------------------------------------------------
This email and attachment(s): [  ] blogable; [ x ] ask first; [  ]
private and confidential

daggerquill [at] gmail [dot] com
http://www.tuaw.com  http://www.downloadsquad.com  http://www.engatiki.org

values of β will give rise to dom!
Kurtz Le Pirate - 11 Jan 2007 18:30 GMT
> for some reason, X11 has a different version of @INC than reported with
> apple's terminal. if i run
>
> perl -e 'foreach (@INC) { print "$_\n";}' with apple_terminal, i get

for me, under 'terminal' i get :
--------------------------------
/usr/local/lib/perl5/5.8.8/darwin-2level
/usr/local/lib/perl5/5.8.8
/usr/local/lib/perl5/site_perl/5.8.8/darwin-2level
/usr/local/lib/perl5/site_perl/5.8.8
/usr/local/lib/perl5/site_perl
.

under 'x11' :
-------------
/System/Library/Perl/5.8.1/darwin-thread-multi-2level
/System/Library/Perl/5.8.1
/Library/Perl/5.8.1/darwin-thread-multi-2level
/Library/Perl/5.8.1
/Library/Perl
/Network/Library/Perl/5.8.1/darwin-thread-multi-2level
/Network/Library/Perl/5.8.1
/Network/Library/Perl
.

Signature

klp

Jesse Engel - 11 Jan 2007 23:51 GMT
all suggestions are gladly welcomed. i haven't had any time to poke at it but hopefully i can find
something good. i'm imagining that the lack of an xinitrc file other than the default is the
culprit. i have installed perlmodules via fink and that probably has created some issues as well.
thanks for all of the hints.

jesse


____________________________________________________________________________________
Want to start your own business?
Learn how on Yahoo! Small Business.
http://smallbusiness.yahoo.com/r-index
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.