upgrading modules perl 5.8.8 -> 5.10.0

M

Michael Friendly

[Running debian linux]
As part of a routine upgrade of some of my software, apt insisted on
upgrading perl from 5..8.8 to 5.10.0.

I had many CPAN modules installed, under
/usr/local/lib/perl/5.8.8/
/usr/local/share/perl/5.8.8/

and now, of course, my scripts that try to USE them fail. Is there some
simple way to install them so they will work with 5.10.0 without having
to go through the list one by one? Is there something like the perl
package manager for linux?

-Michael
 
G

Gunnar Hjalmarsson

Michael said:
[Running debian linux]
As part of a routine upgrade of some of my software, apt insisted on
upgrading perl from 5..8.8 to 5.10.0.

I had many CPAN modules installed, under
/usr/local/lib/perl/5.8.8/
/usr/local/share/perl/5.8.8/

and now, of course, my scripts that try to USE them fail.

That's not apparent to me out from your description. Paths containing
pure Perl modules typically should work under 5.10.0 as well. Of course,
you have to make sure that your 5.10.0 perl finds them.

The best way to do that is to install 5.10.0 so that 5.8.8 paths to pure
Perl modules are included in @INC. Try this link for further guidance on
the topic:
http://search.cpan.org/~rgarcia/perl-5.10.0/INSTALL#Coexistence_with_earlier_versions_of_perl_5

Otherwise you may want to play with the PERL5LIB environment variable or
the lib pragma.

Modules that need to be pre-compiled, OTOH, you will probably need to
reinstall.

HTH
 
F

friendly

The best way to do that is to install 5.10.0 so that 5.8.8 paths to pure
Perl modules are included in @INC. Try this link for further guidance on
the topic:http://search.cpan.org/~rgarcia/perl-5.10.0/INSTALL#Coexistence_with_...

Otherwise you may want to play with the PERL5LIB environment variable or
the lib pragma.
Thanks for the reply.

OK, setting PERL5LIB seems like the easiest way for non-compiled
modules.
How could I find the 5.8.8 modules I have which *are* compiled?

-Michael
 
M

Michael Friendly

Gunnar said:
Michael said:
[Running debian linux]
As part of a routine upgrade of some of my software, apt insisted on
upgrading perl from 5..8.8 to 5.10.0.

I had many CPAN modules installed, under
/usr/local/lib/perl/5.8.8/
/usr/local/share/perl/5.8.8/

and now, of course, my scripts that try to USE them fail.

That's not apparent to me out from your description. Paths containing
pure Perl modules typically should work under 5.10.0 as well. Of course,
you have to make sure that your 5.10.0 perl finds them.

The best way to do that is to install 5.10.0 so that 5.8.8 paths to pure
Perl modules are included in @INC. Try this link for further guidance on
the topic:
http://search.cpan.org/~rgarcia/perl-5.10.0/INSTALL#Coexistence_with_earlier_versions_of_perl_5

Is there any way to append my previous 5.8.8 paths to @INC without
recompiling perl or modifying my script files. That would be the
cleanest solution. Then I could update any modules in 5.10.0 I
needed using the cpan tool and the updated versions would be found
first. Alternatively, something like
cpan upgrade
where it looks in my 5.8.8 libraries and upgrades these to 5.10.0

As a temporary measure, I modified PERL5LIB,
PERL5LIB=/home/friendly/lib/perl:/usr/local/share/perl/5.8.8/:/usr/local/lib/perl/5.8.8/

but I realized this means that anything under 5.8.8 would take
precedence over anything newer in 5.10.0

Otherwise you may want to play with the PERL5LIB environment variable or
the lib pragma.


--
Michael Friendly Email: (e-mail address removed)
Professor, Psychology Dept.
York University Voice: 416 736-5115 x66249 Fax: 416 736-5814
4700 Keele Street http://www.math.yorku.ca/SCS/friendly.html
Toronto, ONT M3J 1P3 CANADA
 
G

Gunnar Hjalmarsson

Michael said:
Gunnar said:
Michael said:
[Running debian linux]
As part of a routine upgrade of some of my software, apt insisted on
upgrading perl from 5..8.8 to 5.10.0.

I had many CPAN modules installed, under
/usr/local/lib/perl/5.8.8/
/usr/local/share/perl/5.8.8/

and now, of course, my scripts that try to USE them fail.

That's not apparent to me out from your description. Paths containing
pure Perl modules typically should work under 5.10.0 as well. Of
course, you have to make sure that your 5.10.0 perl finds them.

The best way to do that is to install 5.10.0 so that 5.8.8 paths to
pure Perl modules are included in @INC. Try this link for further
guidance on the topic:
http://search.cpan.org/~rgarcia/perl-5.10.0/INSTALL#Coexistence_with_earlier_versions_of_perl_5

Is there any way to append my previous 5.8.8 paths to @INC without
recompiling perl or modifying my script files. That would be the
cleanest solution. Then I could update any modules in 5.10.0 I
needed using the cpan tool and the updated versions would be found
first. Alternatively, something like
cpan upgrade
where it looks in my 5.8.8 libraries and upgrades these to 5.10.0

As a temporary measure, I modified PERL5LIB,
PERL5LIB=/home/friendly/lib/perl:/usr/local/share/perl/5.8.8/:/usr/local/lib/perl/5.8.8/

but I realized this means that anything under 5.8.8 would take
precedence over anything newer in 5.10.0

Right. So, to summarize, you don't want to
- recompile perl
- modify the script files
- make older modules take precedence over modules installed in 5.10.0

Well, that equation is over my head. ;-)

If you are ready to give up your wish to not change the script files,
you can use push() to append paths to @INC:

BEGIN {
push @INC, qw(
/home/friendly/lib/perl
/usr/local/share/perl/5.8.8/
/usr/local/lib/perl/5.8.8/
);
}
 

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,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top