Tugger the SLUGger!SLUG Mailing List Archives

Re: [SLUG] Perl upgrading


slug-bounces@xxxxxxxxxxx wrote on 05/19/2006 01:20:36 AM:

> whilst looking where to install 'new' Perl, I've discovered that I've
> already installed it some time ago:
> ---------------------------------------------------
> # whereis perl
> perl: /usr/bin/perl /usr/local/bin/perl /usr/share/man/man1/perl.1.gz
> 
> # /usr/bin/perl --version
> This is perl, v5.6.1 built for i386-linux
> 
> # /usr/local/bin/perl --version
> This is perl, v5.8.6 built for i686-linux-thread-multi
> 
> ---------------------------------------------------
> 
> for some reason, it seems I stopped or whatever
> 
> so, just to confirm:
> 
> I leave my 'old' perl for any system stuff 'as is';
> any new perl scripts I install, I edit the '#!' to point at the 'new' 
perl;

I take it /usr/local/bin/perl is a symlink to /usr/local/bin/perl5.8.1?
If this is the case, I would suggest removing /usr/local/bin/perl, and 
reference the new version as /usr/local/bin/perl5.8.1
This will save any confusion if something goes wrong due to $PATH orders 
etc.

> 
> and , everyone is happy, and, I have current perl
> 
> now, what about all these CPAN libraries that I need from time to time:
> 
> do I need to install one for each version ? or, how do I handle that ?
> 
Yes, you will mostly need to installed modules them for each version.
You can simply 'perl -MCPAN -e shell' (for current perl)
and 'perl5.8.1 -MCPAN -e shell' (for new perl)

Cheers,

Scott