in reply to Mac Perl Package Question

Not being a Mac user, I'm going to guess that MacOSX::File::Copy is shipped with the perl that comes with MacOSX. And that all the rest of your modules that came shipped with MacOSX are also in /Library/Perl and/or /Library/Perl/darwin.

The /System/Library/Perl and /System/Library/Perl/darwin directories hold all user-installed modules and user-installed darwin-specific code (whether that's modules or compiled XS code).

This is little different from the unix platforms that have a "site_perl" path for user-installed modules (and, on some linux distros, a vendor_perl path for vendor-supplied modules, which is where modules that are needed by the vendor applications would live).

Update: As per below, I guessed backwards. Well, I did say I wasn't a Mac user :-) Either way, the reason for the two "darwin" directories is for this separation of what comes with the perl distribution vs what is user-installed.

Replies are listed 'Best First'.
Re^2: Mac Perl Package Question
by Thilosophy (Curate) on Apr 12, 2005 at 03:28 UTC
    The /System/Library/Perl and /System/Library/Perl/darwin directories hold all user-installed modules and user-installed darwin-specific code (whether that's modules or compiled XS code).

    Actually, it is the other way around: /System/Library/Perl is the vendor_perl directory, and site_perl is /Library/Perl.

    Apple-shipped stuff is in /System/Library/Perl, CPAN modules go to /Library/Perl.

    And starting with Mac OS X 10.3, under both of these directories are Perl-version-specific subdirectories (so that you can have different Perl version concurrently).

    The Perl that ships with 10.3 has this search path:

    @INC: /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 .

      I'll back Tholosophy on this one -- don't mess with stuff in /System. You should do as CPAN does, and drop stuff in /Library/Perl. The big clue is that /Library is group writable:

      [mildly:~] oneiros% ls -ald /System /System/Library /Library drwxrwxr-x 41 root admin 1394 Feb 17 08:01 /Library drwxr-xr-x 4 root wheel 136 Dec 15 19:12 /System drwxr-xr-x 52 root wheel 1768 Feb 19 09:45 /System/Library

      This also goes for user-installed fonts, screen savers, pref panes, startup items, etc. -- put them in the appropriate directories in /Library not /System/Library

        This also goes for user-installed fonts, screen savers, pref panes, startup items, etc. -- put them in the appropriate directories in /Library not /System/Library.

        For these things, you can even put them in ~/Library (that is inside of your home directory, for example /Users/YourName/Library). Most Mac applications will search there, too. Does not work for Perl modules, though (unless you manually adjust @INC, which of course is easy), and other users cannot see or use them (which in many cases is a good thing).

        Thanks.

        Have another question. What exactly do these intall steps do?

        perl Makefile.PL
        make
        make test
        make install

        In the past I have checked a modules source and if it was pure perl I manually placed it in the correct directory. A week ago I had a module where this didn't work UNLESS I removed the comment statements; then, all was fine. I tried using the above steps but the "make test" wouldn't work. Someone on this forum sugessted skipping this because they suspected I didn't have something installed (I have perl that came with 10.2.x - think it's 2.6). The install "worked" but I still had to remove the comment statements?????