in reply to Re: Mac Perl Package Question
in thread Mac Perl Package Question

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 .

Replies are listed 'Best First'.
Re^3: Mac Perl Package Question
by jhourcle (Prior) on Apr 12, 2005 at 03:39 UTC

    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?????

        Really, they don't have to do anything, other than put the files in the correct place, in the case of a pure perl installation. However, it's possible that they're doing other things as well, as they may trigger other items to register that they now exist on your system. (XML::Parser comes to mind), or they may set up configuration information (like Bundle::libnet)

        For the most part, you can generally expect them to do the following (but remember -- these aren't necessarily rules, this is more like guidelines than anything else.)

        perl Makefile.PL
        Builds the file named 'Makefile' which is used by the make command. May derive values from the current perl installation, or prompt you for information, or expect you to pass in things through environmental variables or as command line arguments. It's somewhat common for this step to generate new files, or modify existing ones.
        make
        Compiles whatever components need it, and places them into the blib directory. (it's also possible that this step might generate new files, or modify existing ones).
        make test
        Runs a series of tests (typically in the 't' directory if it's a more recent module) to test that the module is working correctly on your system.
        make install
        Moves files to their proper location on your system.