On Wed, 6 Feb 2002, Geoffrey F. Green wrote:

> I'm a relative newbie to Unix, and Perl for that matter

Welcome! The more the merrier :)

I'm not 100% sure about these answers, so excuse me for trimming a little.
Using CPAN -- either as /usr/bin/cpan or 'perl -MCPAN -e shell' -- does
make installing modules a lot easier, but it also puts you on autopilot,
and that could mean doing questionable things (like stomping over system
files). Your first question is a good one and I'm also curious if CPAN can
be used in such a way that you can control where files go. Anyone?

> 1a.  Do I have to run CPAN as root?  (I'm a bit paranoid of overwriting
> critical system files).

Or under sudo, yeah I would say so. For a normal module install, the old
way was to find & download the required tar.gz file[s], and then e.g.:

    % tar -zxvf foo.tar.gz
    % cd foo
    % perl Makefile.PL
    % make
    % make test
    % sudo make install

I.e. if each step is successful, and only the last one should be done as
root. However, since you're automating all this as one step with CPAN.pm,
I don't think it'll work without running it under sudo. You might be able
to install libraries to your home directory & avoid this, but I think this
is a pretty safe & appropriate usage of 'sudo', so go ahead & use it. Just
make sure you pay attention when it asks things like "Do you want to
install the HEAD utility? [Y/n]", which you already know about. 
 
> 2. Each time I've tried to install a module using CPAN, CPAN appears to
> download the source to Perl 5.6.1.  I've read enough of the trials and
> travails people have had installing 5.6.1 that I don't want to join the
> fun.  So each time I've killed CPAN.  CPAN's not going to try to install
> Perl 5.6.1 automatically, is it? 

It's only done that for me once, and I honestly didn't notice how I
triggered that to happen in the first place. For most of the things you
install this shouldn't be a problem, and if it does ask if you want to do
this you should be able to just tell it not to do so when CPAN asks.

OSX Perl is a Brave New World, with a lot of bugs yet to be worked out;
your questions are perfectly appropriate :)


--
Chris Devers

"Okay, Gene... so, -1 x -1 should equal what?" "A South American!"    
[....] "no human can understand the Timecube" and Gene responded
 without missing a beat "Yeah.  I'm not human."

Reply via email to