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.

On Oct 29, 2005, at 9:08 AM, Mike Lesser wrote:

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



Reply via email to