Re: Installing new(er) perl on Jaguar

2004-11-03 Thread Joel Rees
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.
List of installed modules. I must be distracted.
--
Joel Rees
Nothing to say today
so I'll say nothing:
Nothing.


Re: Installing new(er) perl on Jaguar

2004-11-03 Thread David Cantrell
On Tue, Nov 02, 2004 at 06:05:05PM -0500, Sherm Pendley wrote:

 Read the instructions that come with Perl - readme.macosx.
 
 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 do *not* advise removing the perl that comes with OS X.  Or indeed
building your own version of any part of the system and replacing it, on
any OS.  Vendor updates will not have been tested with your version.

Instead, install perl in /usr/local/, and make sure that that comes
first in your path.

-- 
David Cantrell | http://www.cantrell.org.uk/david

 Pressure was growing last night for the global war on terror to be
 broadened to take in a wide range of other 'rogue emotions' including
 horror, shock and a general feeling of bewilderment about the state of
 the world.-- The Brains Trust


Re: Installing new(er) perl on Jaguar

2004-11-03 Thread Sherm Pendley
On Nov 3, 2004, at 6:42 AM, David Cantrell wrote:
I do *not* advise removing the perl that comes with OS X.
Neither did I. There's a big difference between removing perl and 
changing which perl is the default.

I suggested removing /usr/bin/perl, which by default is just a link to 
/usr/bin/perl5.6.1. Nothing will be removed for good - in the highly 
unlikely event of any problems, it's trivially simple to work around 
them. For one-time scripts (installers, etc.) you can temporarily 
remove the 5.8.4 symlink and revert to the 5.6.1 symlink while you're 
running that script. And for stuff that's going to stick around for a 
while (startup items, etc.), you just point the script to 
#!/usr/bin/perl5.6.1.

Instead, install perl in /usr/local/, and make sure that that comes
first in your path.
That's fine for scripts that you run from a shell, with perl 
scriptname.pl. Do you run many of your scripts that way? I certainly 
don't. Most of my scripts depend on the first #! line to choose a Perl.

sherm--


Re: Installing new(er) perl on Jaguar

2004-11-03 Thread Sherm Pendley
On Nov 3, 2004, at 4:19 AM, Joel Rees wrote:
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--


Re: Installing new(er) perl on Jaguar

2004-11-03 Thread David Cantrell
On Wed, Nov 03, 2004 at 11:50:07AM -0500, Sherm Pendley wrote:
 On Nov 3, 2004, at 6:42 AM, David Cantrell wrote:
 I do *not* advise removing the perl that comes with OS X.
 Neither did I. There's a big difference between removing perl and 
 changing which perl is the default.
 I suggested removing /usr/bin/perl, which by default is just a link to 
 /usr/bin/perl5.6.1.

Ah, OK.  I didn't know that was just a link.

 Instead, install perl in /usr/local/, and make sure that that comes
 first in your path.
 That's fine for scripts that you run from a shell, with perl 
 scriptname.pl. Do you run many of your scripts that way? I certainly 
 don't. Most of my scripts depend on the first #! line to choose a Perl.

And for me, that first line is always #!/usr/local/bin/perl.  I'm trying
to train myself to use #!/usr/bin/env perl instead.

-- 
David Cantrell | http://www.cantrell.org.uk/david

Every normal man must be tempted at times to spit on his hands,
 hoist the black flag, and begin slitting throats. -- H. L. Mencken


Re: Installing new(er) perl on Jaguar

2004-11-03 Thread Joel Rees
Instead, install perl in /usr/local/, and make sure that that comes
first in your path.
That's fine for scripts that you run from a shell, with perl 
scriptname.pl. Do you run many of your scripts that way? I certainly 
don't. Most of my scripts depend on the first #! line to choose a  Perl.
Actually, there is one more reason not to put /usr/local/bin in your 
path ahead of /bin.

It's a potential security weak spot.
(Say some package you test out puts a program of some sort named ps 
in /usr/local/bin.)

--
Joel Rees
even though much of what I do is not sensible
it does make sense if you know why ...


Re: Installing new(er) perl on Jaguar

2004-11-02 Thread Joel Rees
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.


Re: Installing new(er) perl on Jaguar

2004-11-02 Thread Sherm Pendley
On Nov 2, 2004, at 4:39 PM, John Horner wrote:
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--


Re: Installing new(er) perl on Jaguar

2004-11-02 Thread Sherm Pendley
On Nov 2, 2004, at 6:21 PM, Joel Rees wrote:
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--