Home > Archive > PERL Modules > August 2005 > Passing Environment and ExtUtils::MakeMaker options to CPAN methods
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Passing Environment and ExtUtils::MakeMaker options to CPAN methods
|
|
| comp.lang.perl.modules 2005-08-05, 4:59 pm |
| I'm trying to fully automate the installation of a long list of modules
using methods in CPAN::Shell, rather than running that shell
interactively. For modules that require no interaction, this has been
easy.
However, there are many modules that require you to set specific
environment variables and/or pass options to ExtUtils::MakeMaker on the
command line, such as in this example for the XML::LibXML module:
cpan> look XML::LibXML
$ XMLPREFIX=/usr/local/src/libxml2/2.6.13 \
/full/path/to/perl Makefile.PL \
LIBS='-L/usr/local/lib -R/usr/local/lib -L/usr/lib -lxml2 -lz -lm' \
INC='-I/usr/local/include/libxml2 -I/usr/include'
$ make
$ make test
$ make install
$ exit
After searching for solutions to accomplishing the same result using
CPAN::Shell, Module::Install, etc, I'm still not clear on how I'd pass
this information to the CPAN::Shell->make() method, for instance.
I'm sure it would be easy to pass the environment variable indirectly
by setting $ENV{XMLPREFIX} prior to calling CPAN::Shell->make(), but
that still leaves the options that need to be passed to
ExtUtils::MakeMaker.
Any pointers appreciated.
| |
| comp.lang.perl.modules 2005-08-05, 4:59 pm |
| Sorry, I meant to say CPAN::Module->make() method above, not
CPAN::Shell->make().
Gordon Marler
gmarler@gmarler.com
|
|
|
|
|