]> git.vpit.fr Git - perl/modules/autovivification.git/commitdiff
Add BUILD_REQUIRES to WriteMakefile()
authorVincent Pit <vince@profvince.com>
Mon, 29 Oct 2012 12:56:57 +0000 (10:56 -0200)
committerVincent Pit <vince@profvince.com>
Mon, 29 Oct 2012 12:56:57 +0000 (10:56 -0200)
Also add Config and Exporter to BUILD_REQUIRES.

Makefile.PL

index 22092a07a9d987da1129adbcb082aa3ac37d5754..72bad649e4d27837cf6ceaeaf9a74a94e9ece0dd 100644 (file)
@@ -4,12 +4,7 @@ use strict;
 use warnings;
 use ExtUtils::MakeMaker;
 
 use warnings;
 use ExtUtils::MakeMaker;
 
-BEGIN {
- local $@;
- eval { require Config };
- die 'OS unsupported' if $@;
- Config->import(qw<%Config>);
-}
+use Config;
 
 my @DEFINES;
 my %macro;
 
 my @DEFINES;
 my %macro;
@@ -57,14 +52,20 @@ my %PREREQ_PM = (
  'XSLoader' => 0,
 );
 
  '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 => {
 my %META = (
  configure_requires => {
   'ExtUtils::MakeMaker' => 0,
  },
  build_requires => {
-  'ExtUtils::MakeMaker' => 0,
-  'Test::More'          => 0,
-  %PREREQ_PM,
+  %BUILD_REQUIRES,
  },
  dynamic_config => 1,
  resources => {
  },
  dynamic_config => 1,
  resources => {
@@ -83,6 +84,7 @@ WriteMakefile(
  ABSTRACT_FROM    => $file,
  PL_FILES         => {},
  @DEFINES,
  ABSTRACT_FROM    => $file,
  PL_FILES         => {},
  @DEFINES,
+ BUILD_REQUIRES   => \%BUILD_REQUIRES,
  PREREQ_PM        => \%PREREQ_PM,
  MIN_PERL_VERSION => '5.008003',
  META_MERGE       => \%META,
  PREREQ_PM        => \%PREREQ_PM,
  MIN_PERL_VERSION => '5.008003',
  META_MERGE       => \%META,