How to manage several versions of Perl modules during the install?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to manage several versions of Perl modules during the install?
# 1  
Old 06-11-2009
How to manage several versions of Perl modules during the install?

Hello, I would really appreciate any advice on this issue:


My Perl Module Environment:

/usr/lpp/perl/lib/5.8.7 => has the Perl modules that come with the base Perl installation. Comes first in @INC concatination.

/usr/lpp/perl/lib/site_perl/5.8.7 => has all my installed Perl modules that I downloaded from CPAN. Comes last in @INC concatination.

Installation Method: ExtUtils::MakeMaker

Restrictions:
I cannot touch/modify the original Perl installation. This means that I cannot delete any of the pre-installed Perl modules from the /usr/lpp/perl/lib/5.8.7 directory.

My Problem: This is a generic problem, with this specific example:
  • Test::More 0.54 is installed in /usr/lpp/perl/lib/5.8.7
  • Test::More 0.62 is installed in /usr/lpp/perl/lib/site_perl/5.8.7
  • I want to install Email:Abstract 3.001. When I issue the Makefile.PL command, I get this warning:
"Warning: prerequisite Test::More 0.62 not found. We have 0.54."
  • Test::More 0.54 is found first because its library is concativated first in @INC. MakeMaker does not find Test::More 0.62, because the older version was already found.
Question: Can MakeMaker manage several versions of Perl modules during the install?

This is what I found in MakeMaker documentation (ExtUtils::MakeMaker - Create a module Makefile - search.cpan.org):

"Sometimes older versions of the module you're installing live in other directories in @INC. Because Perl loads the first version of a module it finds, not the newest, you might accidentally get one of these older versions even after installing a brand new version. To delete all other versions of the module you're installing (not simply older ones) set the UNINST variable."

Given my restriction of not deleting anything from /usr/lpp/perl/lib/5.8.7, is there a way to indicate to MakeMaker to search through all @INC directories to find the required versions of a Perl Module?

Any suggestions for a workaround?

Thanks a lot!

Genya
# 2  
Old 06-14-2009
Perl just obeys the ordering imposed by @INC. So, I guess you can get away with it by force prepending '/usr/lpp/perl/lib/site_perl/5.8.7' to @INC while you do "perl Makefile.PL". It does no harm if you have the same path twice in the @INC because Perl just uses the first one.

Try adding -I/usr/lpp/perl/lib/site_perl/5.8.7 to the command and tell us how it goes.

i.e.

Code:
perl -I/usr/lpp/perl/lib/site_perl/5.8.7 Makefile.PL

Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

How do You manage different program versions?

Hallo, I have an general question which happens when installing software by compiling them self. I'm using FreeBSD system 10.0 and the ports. for info, see: http--en.wikipedia.org/wiki/FreeBSD_Ports. As I installed BSD for some years there was (i.e.) perl-14 installed. Now, when doing some... (1 Reply)
Discussion started by: HL1234
1 Replies

2. Shell Programming and Scripting

Script to install Perl Modules

Hi guys, I need to upgrade perl modules on about multiple machines. I'm writing a for loop for it. for i in 1 2 3 4 5 6; do ssh server$i " sudo cpan Mozilla::CA, sudo cpan LWP::UserAgent, sudo cpan LWP::Protocol::https, sudo cpan IO::Socket::SSL, sudo cpan Net::SSL,... (2 Replies)
Discussion started by: scj2012
2 Replies

3. Programming

How to automatically install all modules required by a script from CPAN?

Having a script.pl how can I automatically download from CPAN all required modules and install and update as required? Something like "emerge -uDNav world" for the perl? ---------- Post updated at 05:38 PM ---------- Previous update was at 05:28 PM ---------- Doesn't matter I've found it ... (6 Replies)
Discussion started by: Tribe
6 Replies

4. Shell Programming and Scripting

how to create custom modules in perl and how to import all modules with single command?

I have some custom functions which i want to use in perl Scripting all time. i want to How to create modules in perl and how to import them. Also if i create 15 modules and i want to > import all at once then how can i import? (0 Replies)
Discussion started by: Navrattan Bansa
0 Replies

5. UNIX and Linux Applications

install multiple versions of firefox in linux

Since apt-get and yum won't let you install multiple versions of firefox I will explain how to here. 1. Go to this page and decide which version of firefox you want. ftp://ftp.mozilla.org/pub/mozilla.org/firefox/releases/ I used this one. ... (0 Replies)
Discussion started by: cokedude
0 Replies

6. Shell Programming and Scripting

Unable to install perl XML and EXCEL modules in windows XP.

Hi, I am using perl 5.12. I want to install XML modules and Excel modules which is from perl in windows. I am using ppm to install these perl modules. My proxy is this: mtd.ixs.ibab.com/proxy.pac (with http in the beginning) I used this to set but i unable to download any pakage, Using... (5 Replies)
Discussion started by: vanitham
5 Replies

7. Shell Programming and Scripting

How to install perl modules in Solaris

Hi All, How to install the perl modules in Solaris? pwd /eweiquu/ocsta/lib/XML-Simple-2.18 and bash-3.00# perl Makefile.PL Checking installed modules ... XML::Parser is installed, it will be used by the test suite Writing Makefile for XML::Simple and then the readme file says,you... (2 Replies)
Discussion started by: Damon_Qu
2 Replies

8. Shell Programming and Scripting

Install modules on strawberry perl

Hi, I'm using strawberry perl on windows 7 rc, and for the past few days I haven't manage to install any modules. I understand that I have to download the module from cpan, which I do, afterwards I have to open cmd, change directory to where I have extracted the module, and type: perl... (0 Replies)
Discussion started by: byte1918
0 Replies

9. Shell Programming and Scripting

How to install perl modules

Hi. i installed perl 5.8.8.822 in my D: drive(windows xp).When im trying to install IO-Stringy.pm module( or any module for tat matter ) it is getting installed in 'c:\temp\please run installed script' folder no matter from where ever i run the ppm installation.The path variable is set to... (3 Replies)
Discussion started by: Anuj8584
3 Replies

10. Shell Programming and Scripting

How to manage multiple versions of a set of shell and SQL script utilities

Hi all --- I have the need to manage multiple versions of a set of utility scripts -- both shell and SQL and other .dat files. I am wondering if anyone out there knows of a good way to "PATH" to SQL and text files in a way similar to how PATH facilitates finding executables in a pre-specified... (2 Replies)
Discussion started by: DennisB
2 Replies
Login or Register to Ask a Question