From: Vincent Pit Date: Mon, 29 Oct 2012 12:56:57 +0000 (-0200) Subject: Add BUILD_REQUIRES to WriteMakefile() X-Git-Tag: v0.11~4 X-Git-Url: http://git.vpit.fr/?a=commitdiff_plain;h=d243a60a93df241b82cd810c5e82e9245029bae4;p=perl%2Fmodules%2Fautovivification.git Add BUILD_REQUIRES to WriteMakefile() Also add Config and Exporter to BUILD_REQUIRES. --- diff --git a/Makefile.PL b/Makefile.PL index 22092a0..72bad64 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -4,12 +4,7 @@ use strict; use warnings; use ExtUtils::MakeMaker; -BEGIN { - local $@; - eval { require Config }; - die 'OS unsupported' if $@; - Config->import(qw<%Config>); -} +use Config; my @DEFINES; my %macro; @@ -57,14 +52,20 @@ my %PREREQ_PM = ( 'XSLoader' => 0, ); +my %BUILD_REQUIRES = ( + 'Config' => 0, + 'Exporter' => 0, + 'ExtUtils::MakeMaker' => 0, + 'Test::More' => 0, + %PREREQ_PM, +); + my %META = ( configure_requires => { 'ExtUtils::MakeMaker' => 0, }, build_requires => { - 'ExtUtils::MakeMaker' => 0, - 'Test::More' => 0, - %PREREQ_PM, + %BUILD_REQUIRES, }, dynamic_config => 1, resources => { @@ -83,6 +84,7 @@ WriteMakefile( ABSTRACT_FROM => $file, PL_FILES => {}, @DEFINES, + BUILD_REQUIRES => \%BUILD_REQUIRES, PREREQ_PM => \%PREREQ_PM, MIN_PERL_VERSION => '5.008003', META_MERGE => \%META,