Can someone "disambiguate" this article for me please?
http://developer.apple.com/internet/opensource/perl.html
Or instead, point me to another one?
I have 5.6.0 on a machine running Jaguar. I need to run
WWW::Mechanize on it, which requires at least 5.6.1.
I want to mess with the server the absolute minimum amount possible,
but I don't quite understand this bit:
The Install Directory
Most shell applications offer you the choice of where
to install, and Perl is no different. Some users
install large applications in a directory called /opt,
others follow Fink's behavior and drop them into /sw,
and still others follow the standard /usr/local. I'll
be using the default Perl layout for OS X which is
determined by hints/darwin.sh. This file is included as
part of the Perl distribution and is utilized during
our initial configuration. Opening that file in a text
editor, we'll see that a default install is defined as:
I can't be 100% sure what he's telling me to do if I want the new
Perl to know about the existence of all the modules I installed with
the old Perl. I'm guessing I could go ahead with the default and put
a "use lib /path/to/whatever/" in all my old scripts but who wants to
do that?
Anyone who can give me a "for dummies" on exactly how I should edit
that "hints/darwin.sh" file so that, after installing, all the
modules I installed for the old Perl are found by the new one, TIA.
------------------------------------------------------------
"Have You Validated Your Code?"
John Horner (+612 / 02) 9333 2110
Senior Developer, ABC Online http://www.abc.net.au/
------------------------------------------------------------
Sherm Pendley - 03 Nov 2004 00:05 GMT
> Can someone "disambiguate" this article for me please?
>
> http://developer.apple.com/internet/opensource/perl.html
Ignore it. It was written for versions of Perl that are no longer
relevant.
> Or instead, point me to another one?
Read the instructions that come with Perl - readme.macosx.
> I can't be 100% sure what he's telling me to do if I want the new Perl
> to know about the existence of all the modules I installed with the
> old Perl.
What you want is not possible. Modules that were installed under 5.6.x
are *not* compatible with 5.8.x.
Build and install the new Perl using the default layout. This will
install everything under /usr/local. Remove /usr/bin/perl and replace
it with a symbolic link to /usr/local/bin/perl.
> I'm guessing I could go ahead with the default and put a "use lib
> /path/to/whatever/" in all my old scripts but who wants to do that?
No one who wants working scripts wants to do that.
> Anyone who can give me a "for dummies" on exactly how I should edit
> that "hints/darwin.sh" file so that, after installing, all the modules
> I installed for the old Perl are found by the new one, TIA.
You don't want them to be found by the new one, because they won't work
with it. Once you've installed your new Perl, install the modules you
need.
sherm--
Joel Rees - 03 Nov 2004 00:21 GMT
> Can someone "disambiguate" this article for me please?
I'll try. I think you'll recall that this has come up before, so you
may want to take a look in the archives.
> http://developer.apple.com/internet/opensource/perl.html
Consider this article to be old enough to be reference only, by the way.
I'm not up to a point-counterpoint today, I guess, so I'll just snip
the rest of this and wing it.
You can have more than one version of perl installed. In fact, it is
generally recommended to do so. Most Unix systems make heavy use of the
perl that is installed with the system, so if you upgrade perl
underneath the system you risk confusing the system. And if you upgrade
from 5.6 to 5.8, you'll have to make sure all the binary modules the
system has installed (and all the binary modules you installed) are
re-compiled.
It's a lot easier to manage (and therefore a bit more secure) if you
don't have to worry about effects on the system when you upgrade and
add modules to the copy of perl you're using for non-system stuff.
5.8 is recommended for a number of reasons. (More complete Unicode
support is a big reason in my case.)
So, when the installer asks where to install it, tell it to install in
/usr/local (or wherever you keep the non-system stuff you install for
all users).
You will have to edit the first line of _your_ scripts (not the
system's) to
#! /usr/local/bin/perl
and remember to invoke the right CPAN, and such things, which can be a
little confusing.
There is a way to get a list, but I don't remember it, and javadoc
seems to be interfering with my memory of perldoc right now. Maybe
someone can help me here?
--
Joel Rees
Nothing to say today
so I'll say nothing:
Nothing.
Sherm Pendley - 03 Nov 2004 05:23 GMT
> So, when the installer asks where to install it, tell it to install in
> /usr/local (or wherever you keep the non-system stuff you install for
> all users).
It's worth noting that it'll only ask if you run the configure script
in interactive mode. There's also an option you pass to the
configuration script to specify the install prefix. Most folks just do
that, and also pass the option to accept all the other defaults and run
the config script non-interactively.
You've got the right idea though - /usr/local is a great suggestion.
Happily, it's the default, too. ;-)
> There is a way to get a list, but I don't remember it, and javadoc
> seems to be interfering with my memory of perldoc right now. Maybe
> someone can help me here?
Umm... a list of what? Perls? "whereis perl" will do that. If you're in
doubt about which of the installed Perls appear first in your PATH,
"which perl" will tell you that.
sherm--
Joel Rees - 03 Nov 2004 10:19 GMT
>> There is a way to get a list, but I don't remember it, and javadoc
>> seems to be interfering with my memory of perldoc right now. Maybe
[quoted text clipped - 3 lines]
> in doubt about which of the installed Perls appear first in your PATH,
> "which perl" will tell you that.
List of installed modules. I must be distracted.
--
Joel Rees
Nothing to say today
so I'll say nothing:
Nothing.
Sherm Pendley - 03 Nov 2004 18:08 GMT
> List of installed modules.
Autobundle:
perl -MCPAN -e autobundle
That will create a dated bundle file in .cpan/Bundle - for example,
Snapshot_2004_11_03_00.pm for the first snapshot created today. You can
then install this bundle under your new Perl via CPAN:
perl -MCPAN -e 'install Bundle::Snapshot_2004_11_03_00'
sherm--