[sf-perl] How to make Module::Install follow dependencies, with caveats

Quinn Weaver quinn at pgexperts.com
Wed Nov 4 22:32:51 PST 2009


Oh, that magic environment setting I mentioned at the meeting is
PERL_MM_USE_DEFAULT.  Thanks to David Wheeler for hipping me to this.

Background:  Some Perl modules don't respect the cpan shell's  
preqrequisites_policy
or build_requires_install_policy.  Instead, they always prompt you  
about following
dependencies.  This is a real pain if you want to install a bunch of  
modules at once.

It seems this behavior exists in modules that use Module::Install to  
build and install
themselves, but not in modules that use Extutils::MakeMaker or  
Module::Build.
(The latter two may prompt you for other things, though.)

Anyway, if you set PERL_MM_USE_DEFAULT=1, then cpan will assume the  
default.
For Module::Install–based modules, the default is y ("yes, follow  
dependencies").
This fixes the dependency nags.  But...

Be warned you'll also get the default answer to *any* question a  
module asks
(as long as it asks the question using ExtUtils::MakeMaker::prompt 
()).  This might
not be what you wanted.

I decided it was worth it on my development system; YMMV.

--
Quinn Weaver
PostgreSQL Experts, Inc.
http://pgexperts.com/
1-888-743-9778 (my extension: 510)



More information about the SanFrancisco-pm mailing list