perl update - what about the modules?

A

alythh

I am running a faithful RedHat7.3 box - so my Perl version is v5.6.1.
I was thinking about updating to the current Perl version
(5.8.something, right?), since I'm getting tired of receiving errors
about:
--- Error: Constant name 'HASH(0x822f93c)' has invalid characters at
<filename> line xxx (damn constant.pm!)

.... but I was thinking: what happens to all the modules I've installed
- and they're quite a lot? I have to re-install everything????

thanks for any info

Alessandro Magni
 
K

Karl Aminov

I am running a faithful RedHat7.3 box - so my Perl version is v5.6.1.
I was thinking about updating to the current Perl version
(5.8.something, right?), since I'm getting tired of receiving errors
about:
--- Error: Constant name 'HASH(0x822f93c)' has invalid characters at
<filename> line xxx (damn constant.pm!)

... but I was thinking: what happens to all the modules I've installed
- and they're quite a lot? I have to re-install everything????


Yes, that's the cleanest solution.
A rude, but working solution is to include the old library path in
your perl script:

#! /usr/bin/perl
use lib '/usr/lib/perl5/site_perl/5.6.1';

A better solution is to install all libs with the CPAN Perl Module
(interactive command line interface)

user @bash> cpan
install MIME::Lite
....
 
S

Sherm Pendley

Karl said:
(e-mail address removed) wrote in message
A rude, but working solution is to include the old library path in
your perl script:

#! /usr/bin/perl
use lib '/usr/lib/perl5/site_perl/5.6.1';

That can only be considered "working" with some major caveats. He's asking
about a major version upgrade from 5.6 to 5.8, so XS modules that have been
compiled for the old version will *not* work with the newer one. For XS
modules, the trick you're talking about only works for minor upgrades, like
from 5.8.1 to 5.8.6.

It's less of an issue with pure Perl modules.

sherm--
 
J

Joe Smith

Ted said:
The CPAN module can generate a snapshot bundle, which will make
reinstalling everything from CPAN easier. From "perldoc CPAN":

Yep, the last time I used this:

perl -MCPAN -e 'autobundle'
cd src/perl; ./configure && make && make test && make install; cd
perl -MCPAN -e 'install '`ls -t .cpan/Bundle/Snapshot* | sed -n '1
s%.cpan/Bundle/%bundle::%p'`

(That last line resolves to 'install bundle::Snapshot_yyyy_mm_dd_00.pm')
-Joe
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top