upgrading perl

Erik Norgaard norgaard at locolomo.org
Fri Dec 31 03:46:15 PST 2004


Karl Agee wrote:
> Freebsd 4.11-pre.  I am working on learning perl, and have perl 5.00x 
> that is in the base system when I installed 4.10-Release.  Since most of 
> the learning materials out there are based on later verisions esp since 
> 5.6.x some of the features arent in this older version.
> 
> I am considering upgrading to 5.8.5 via ports, but, dont know if that 
> will break anything.

It won't break anything.

You can have the base install, 5.6.x and 5.8.x installed from ports 
simultaneously. After installing perl from ports you run

    /usr/local/bin/use.perl port

This will create links to the port install, eg.

    /usr/bin/perl -> /usr/bin/perl5.8.5

And you can go back with

    /usr/local/bin/use.perl system

Which will then replace the link with, eg.

    /usr/bin/perl -> /usr/bin/perl5

These are the limitations:

use.perl can only switch between one installed port-version and the 
system perl. So if you want to use another port-version (ie. for some 
reason you want both 5.6.x and 5.8.x) you will have to do the linking 
manually.

When you install perl-packages they will be installed into the package 
path of the currently selected perl. So if you use 5.8.5 and install say 
  p5-DBI then this won't be available for the system perl. However, perl 
looks backward, so 5.8.5 sees packages installed for the system perl.

I haven't found big differences between 5.6 and 5.8, so I'd suggest you 
use 5.8. The main reason to stick with an older version is that you 
might develop scripts for platforms where the newer are not available.

Note: If/when you upgrade to 5.x there is no system perl, this is partly 
to avoid the mess with multiple versions of perl.

Cheers, Erik

-- 
Ph: +34.666334818                                  web: www.locolomo.org
S/MIME Certificate: http://www.locolomo.org/crt/2004071206.crt
Subject ID:  A9:76:7A:ED:06:95:2B:8D:48:97:CE:F2:3F:42:C8:F2:22:DE:4C:B9
Fingerprint: 4A:E8:63:38:46:F6:9A:5D:B4:DC:29:41:3F:62:D3:0A:73:25:67:C2


More information about the freebsd-questions mailing list