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 / October 2005



Tip: Looking for answers? Try searching our database.

Obvious Noob Q

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Mike Lesser - 29 Oct 2005 17:08 GMT
Hi all. I'm sure this is mentioned somewhere, but I can't seem to  
find the exact answer.

I came back (today) after a long absence (and not much experience),  
which included an update to Tiger. I know that there is a default  
Perl 5.8.6 installation, and separate folders for Apple's use, and  
for our own. However, I can't tell what's what and think I may have  
some excess junk. (I've even reinstalled some pm's, and that just  
made me more confused). I think I have a weird install.

There's the /System/Library/Perl/, which is the Apple (??)  
installation, right. If I update key modules, they will be installed  
here at various levels. For example, CGI goes into /System/Library/
Perl/5.8.6/, while Cwd gets installed into /System/Library/Perl/5.8.6/
darwin-thread-multi-2level/.

Then there's the /Library/Perl/ folder for nonstandard (is there a  
better term?) modules. I've got folders /Library/Perl/5.8.1 and /
Library/Perl/5.8.6.

So far so good? Now what seems odd is that my scripts run on stuff  
that's in 5.8.1. If I move that folder, my stuff won't run. So...I  
have to assume that the 5.8.1 stuff is in the path. That being said,  
what happens when I use CPAN to install or update? Is it smart enough  
to know what to do? Or am I totally hosed now?

TIA
Mike
Edward Moy - 29 Oct 2005 18:18 GMT
If you run:

    % perl -V

you'll see (at the end) @INC, the list of directories that perl will  
search for modules.  First comes the standard ones in /System/Library/
Perl, then the place for user-installable modules in /Library/Perl.  /
Network/Library/Perl might be used by organizations with fileservers  
that want to have a central place for their modules.

Then there is the /System/Library/Perl/Extras directories that Apple  
uses for third party modules it ships.  Finally you should see /
Library/Perl/5.8.1, which is for compatibility with previous user-
installed modules, as in your case.

So you should be fine with perl finding your 5.8.1 modules, as they  
should be compatible.  If you find that any needs to be updated, they  
should automatically go into /Library/Perl/5.8.6 when installed,  
overriding the older ones in /Library/Perl/5.8.1.  Over time, you  
should be able to clean out the old modules as new ones go in.

Edward Moy
Apple

P.S.  Note that the Extras and 5.8.1 directories are controlled by  
the file /Library/Perl/5.8.6/AppendToPath, a feature added by Apple  
to simulate the effect if you had actually compiled perl 5.8.6  
yourself, as it would automatically see the old 5.8.1 directories and  
compile those in.  You can add your own paths to this file if you  
want to append paths to @INC systemwide.  If you create a file /
Library/Perl/5.8.6/PrependToPath, then those paths will be added to  
the beginning of @INC systemwide.

If you ever have a need to run a stock perl installation (assuming  
you haven't installed anything in /System/Library/Perl), you can move  
the /Library/Perl/5.8.6/AppendToPath file aside (just remember to put  
it back afterwards).  This might be useful for developers who want to  
make sure that their code will run on a stock perl installation, or  
to see what additional modules their code depends on.

> Hi all. I'm sure this is mentioned somewhere, but I can't seem to  
> find the exact answer.
[quoted text clipped - 24 lines]
> TIA
> Mike
 
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.