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
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
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
2. Shell Programming and Scripting
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
3. Shell Programming and Scripting
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
4. Shell Programming and Scripting
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
5. Shell Programming and Scripting
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
6. UNIX and Linux Applications
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
7. Shell Programming and Scripting
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
8. Programming
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
9. Shell Programming and Scripting
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
10. UNIX for Dummies Questions & Answers
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
LEARN ABOUT MOJAVE
module::build::compat5.18
Module::Build::Compat(3pm) Perl Programmers Reference Guide Module::Build::Compat(3pm)
NAME
Module::Build::Compat - Compatibility with ExtUtils::MakeMaker
SYNOPSIS
# In a Build.PL :
use Module::Build;
my $build = Module::Build->new
( module_name => 'Foo::Bar',
license => 'perl',
create_makefile_pl => 'traditional' );
...
DESCRIPTION
Because "ExtUtils::MakeMaker" has been the standard way to distribute modules for a long time, many tools (CPAN.pm, or your system
administrator) may expect to find a working Makefile.PL in every distribution they download from CPAN. If you want to throw them a bone,
you can use "Module::Build::Compat" to automatically generate a Makefile.PL for you, in one of several different styles.
"Module::Build::Compat" also provides some code that helps out the Makefile.PL at runtime.
METHODS
create_makefile_pl($style, $build)
Creates a Makefile.PL in the current directory in one of several styles, based on the supplied "Module::Build" object $build. This is
typically controlled by passing the desired style as the "create_makefile_pl" parameter to "Module::Build"'s "new()" method; the
Makefile.PL will then be automatically created during the "distdir" action.
The currently supported styles are:
traditional
A Makefile.PL will be created in the "traditional" style, i.e. it will use "ExtUtils::MakeMaker" and won't rely on "Module::Build"
at all. In order to create the Makefile.PL, we'll include the "requires" and "build_requires" dependencies as the "PREREQ_PM"
parameter.
You don't want to use this style if during the "perl Build.PL" stage you ask the user questions, or do some auto-sensing about the
user's environment, or if you subclass "Module::Build" to do some customization, because the vanilla Makefile.PL won't do any of
that.
small
A small Makefile.PL will be created that passes all functionality through to the Build.PL script in the same directory. The user
must already have "Module::Build" installed in order to use this, or else they'll get a module-not-found error.
passthrough (DEPRECATED)
This is just like the "small" option above, but if "Module::Build" is not already installed on the user's system, the script will
offer to use "CPAN.pm" to download it and install it before continuing with the build.
This option has been deprecated and may be removed in a future version of Module::Build. Modern CPAN.pm and CPANPLUS will
recognize the "configure_requires" metadata property and install Module::Build before running Build.PL if Module::Build is listed
and Module::Build now adds itself to configure_requires by default.
Perl 5.10.1 includes "configure_requires" support. In the future, when "configure_requires" support is deemed sufficiently
widespread, the "passthrough" style will be removed.
run_build_pl(args => @ARGV)
This method runs the Build.PL script, passing it any arguments the user may have supplied to the "perl Makefile.PL" command. Because
"ExtUtils::MakeMaker" and "Module::Build" accept different arguments, this method also performs some translation between the two.
"run_build_pl()" accepts the following named parameters:
args
The "args" parameter specifies the parameters that would usually appear on the command line of the "perl Makefile.PL" command -
typically you'll just pass a reference to @ARGV.
script
This is the filename of the script to run - it defaults to "Build.PL".
write_makefile()
This method writes a 'dummy' Makefile that will pass all commands through to the corresponding "Module::Build" actions.
"write_makefile()" accepts the following named parameters:
makefile
The name of the file to write - defaults to the string "Makefile".
SCENARIOS
So, some common scenarios are:
1. Just include a Build.PL script (without a Makefile.PL script), and give installation directions in a README or INSTALL document
explaining how to install the module. In particular, explain that the user must install "Module::Build" before installing your module.
Note that if you do this, you may make things easier for yourself, but harder for people with older versions of CPAN or CPANPLUS on
their system, because those tools generally only understand the Makefile.PL/"ExtUtils::MakeMaker" way of doing things.
2. Include a Build.PL script and a "traditional" Makefile.PL, created either manually or with "create_makefile_pl()". Users won't ever
have to install "Module::Build" if they use the Makefile.PL, but they won't get to take advantage of "Module::Build"'s extra features
either.
For good measure, of course, test both the Makefile.PL and the Build.PL before shipping.
3. Include a Build.PL script and a "pass-through" Makefile.PL built using "Module::Build::Compat". This will mean that people can
continue to use the "old" installation commands, and they may never notice that it's actually doing something else behind the scenes.
It will also mean that your installation process is compatible with older versions of tools like CPAN and CPANPLUS.
AUTHOR
Ken Williams <kwilliams@cpan.org>
COPYRIGHT
Copyright (c) 2001-2006 Ken Williams. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
SEE ALSO
Module::Build(3), ExtUtils::MakeMaker(3)
perl v5.18.2 2014-01-06 Module::Build::Compat(3pm)