On Jan 5, 2006, at 3:41 PM, The Ghost wrote:
The other perl was installed by darwinports. It doesn't ask
questions. If it did, I wouldn't install it. I'm not concerned
about incompatibilities
You should be.
as the perl versions are so close
The versions are close, but the architectures aren't the same. Binary
modules will be incompatible.
...I have 2 versions of perl installed and only use one of them.
The reason for 2 versions is a port system that refuses to rely
on the already installed perl. So I have:
/System/Library/Perl/5.8.6/darwin-thread-multi-2level
AND
/opt/local/lib/perl5/5.8.7/darwin-2level
The system default Perl is multi-threaded, but the one installed by
DarwinPorts is not. Binary modules compiled for one will not work
with the other. That's why there's an architecture-specific
subdirectory in the first place - it's not just there to annoy you! :-)
If you want scripts that begin with "#!/usr/bin/perl" to use the Perl
that's managed by DarwinPorts, you can delete /usr/bin/perl - it's
just a link to /usr/bin/perl5.8.6, so you already have a backup. Then
replace it with a symbolic link to /opt/local/bin/perl. Like this:
sudo rm /usr/bin/perl
sudo ln -s /opt/local/bin/perl /usr/bin/perl
Note that if you do this, *every* script that begins with "#!/usr/bin/
perl" will be using the DarwinPorts Perl - including the scripts that
Apple supplies, which have not been tested and verified with that
configuration. As you've said, the difference is small, so problems
are very unlikely, but still possible.
The safest route is to leave /usr/bin/perl alone, since Apple-
supplied scripts don't rely on any external modules anyway, and use
"#!/opt/local/bin/perl" in your own scripts, so that they use the
DarwinPorts Perl and any modules you've installed for that.
sherm--
Cocoa programming in Perl: http://camelbones.sourceforge.net
Hire me! My resume: http://www.dot-app.org