On Thu, Mar 25, 2010 at 11:04 PM, <cr...@animalhead.com> wrote: > Your comment "put that in a section that only runs..." > has me all confused. > I just put CONFIGURE_REQUIRES => {EU:MM => 6.56} into Makefile.PL. > It went into META.yml. > > This is a small module and has no "sections" that I can think of. > What do you mean?
Here is an example from Module-Starter. Note the (eval { ExtUtils::MakeMaker->VERSION(...) }) stanzas, which avoid older EU::MM from complaining about invalid arguments to WriteMakefile; WriteMakefile( NAME => 'Module::Starter', AUTHOR => 'Andy Lester <a...@petdance.com>', VERSION_FROM => 'lib/Module/Starter.pm', (eval { ExtUtils::MakeMaker->VERSION(6.21) } ? (LICENSE => 'perl') : ()), ABSTRACT_FROM => 'lib/Module/Starter.pm', EXE_FILES => [ 'bin/module-starter' ], PREREQ_PM => { 'Test::More' => 0, 'Test::Harness' => 0.21, 'ExtUtils::Command' => 0, 'File::Spec' => 0, 'Getopt::Long' => 0, 'Pod::Usage' => 1.21, }, (! eval { ExtUtils::MakeMaker->VERSION(6.46) } ? () : (META_ADD => { resources => { homepage => 'http://code.google.com/p/module-starter/', repository => 'http://module-starter.googlecode.com/svn/trunk/', bugtracker => 'http://rt.cpan.org/NoAuth/Bugs.html?Dist=Module-Starter', }, }) ), dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', }, clean => { FILES => 'Module-Release-*' }, ); Some Makefile.PL's do it slightly differently, by putting all args into something like %WriteMakefileArgs and then deleting them out before calling WriteMakefile: delete $WriteMakefileArgs{LICENSE} unless eval { ExtUtils::MakeMaker->VERSION(6.31) }; WriteMakefile(%WriteMakefileArgs); I hope that clarifies what I meant. -- David