At 13:04 +0100 9/15/09, Mine wrote: >Hi Doug, > >Just before I create the file I would like to check a few points. > >> but you should edit that so that the first directory, before the first >> separating colon, is the one that perl 5.10 is in > >I am not quite sure which is the main Perl folder. /usr/local/bin contains >two Unix executable Perl files - Perl and >Perl 5.10.1. I assume that this should be the first directory.
Ouch. There really ought NOT to be two perl executables. And they would have to have different names to be allowed in the file system. Is there a Macintosh alias or a UNIX link called "perl" which points to one of them? You might even find a link/alias in /usr/bin or /bin that some helpful porter put there. The UNIX tool: which perl can be helpful. You can also, in Terminal, do something like cd /usr/ local/lib/perl5/5.10.1 ./perl -v to see just what you have. The ./ tells the kernel to forget about $PATH and look in the current directory only. In real UNIX file systems perl and Perl would be different. Apple's HFS file system treats them the same (well you can change that) but the likes of CPAN and perl itself might not. > >Which files is PERL5LIB. All the installed modules are stored in /usr/ >local/lib/perl5/5.10.1/. Is this the location of >the PERL5LIB. If so, do I need the full path /usr/local/lib/ perl5/5.10.1/ or >can I use /usr/local/lib/. Environment variable PERL5LIB adds a directory of your choice to perl's @INC list. The way I use it is to place modules, some of my own creation and others downloaded from the likes of CPAN, into my own directory in my own space where I can control it all. Placing a directory within a perl distribution into PERL5LIB probably won't help much but it's conceivable that you could pick up a module from one distribution for use in another. Personally I have had serious problems with CPAN which are related to my need to keep modules on a disk that is not the startup disk. The procedures may be better now - it has been a few years and OS neXt versions since I have tried. > >If the above is correct, then the following is what I think I should write to >a plist file. > ><?xml version="1.0" encoding="UTF-8"?> ><!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http:// >www.apple.com/DTDs/PropertyList-1.0.dtd"> ><plist version="1.0"> ><dict> > <key>PATH</key> > <string>/usr/local/bin:/usr/local/lib:/opt/local/bin:/opt/ > local/sbin</string> > <key>PERL5LIB</key> > <string>/usr/local/lib/perl5</string> ></dict> ></plist> > >opt/local/bin and /opt/local/sbin is taken from a .profile created by >MacPorts which >I hope will preserve the links for MacPorts. I think this would be better. I have added the directories that have the regular UNIX tools in them at the end. Yours will be looked at first.. I have also removed a space. Watch out for line ends added by rampant email and mail list "services" there should be no line ends or spaces between <string> and </string> and the DOCTYPE line should be all one line. <?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>PATH</key> <string>/usr/local/bin:/usr/local/lib:/opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/sbin:/usr/sbin</string> ></dict> ></plist> You can also, in Terminal, change the PATH temporarily with the shell path (lower case) command or by resetting environment variable PATH which is setenv in my favorite shell (tcsh) but is different in bash. Remember that you have to log out and back in to persuade OS neXt to read the plist file. The "sbin" directories are supposed to be for use by system managers. You might not need them but there are those periodic cleanups that run automatically. Whonoze? -- --> From the U S of A, the only socialist country that refuses to admit it. <--