1use 5.006; 2use strict; 3use ExtUtils::MakeMaker; 4# See lib/ExtUtils/MakeMaker.pm for details of how to influence 5# the contents of the Makefile that is written. 6WriteMakefile1( 7 'NAME' => 'Test::Warn', 8 'VERSION_FROM' => 'Warn.pm', # finds $VERSION 9 'PREREQ_PM' => { 10 #'Array::Compare' => 0, 11 #'Test::Exception' => 0, 12 'Test::Builder' => 0.13, 13 'Test::Builder::Tester' => 1.02, 14 'Sub::Uplevel' => 0.12, 15 'Tree::DAG_Node' => 0, 16 }, 17 'BUILD_REQUIRES' => { 18 'File::Spec' => 0, 19 'Test::More' => 0, 20 }, 21 'LICENSE' => 'perl', 22 'MIN_PERL_VERSION' => 5.006, 23 ABSTRACT_FROM => 'Warn.pm', # retrieve abstract from module 24 AUTHOR => 'Alexandr Ciornii <alexchorny'.'@gmail.com>', 25 META_MERGE => { 26 resources => { 27 repository => 'http://github.com/chorny/test-warn/tree', 28 }, 29 keywords => ['testing','warnings'], 30 }, 31); 32 33sub WriteMakefile1 { 34 my %params=@_; 35 my $eumm_version=$ExtUtils::MakeMaker::VERSION; 36 $eumm_version=eval $eumm_version; 37 die "EXTRA_META is deprecated" if exists $params{EXTRA_META}; 38 die "License not specified" if not exists $params{LICENSE}; 39 if ($params{BUILD_REQUIRES}) { #and $eumm_version < 6.5503 40 #Should be modified in future when EUMM will 41 #correctly support BUILD_REQUIRES. 42 #EUMM 6.5502 has problems with BUILD_REQUIRES 43 $params{PREREQ_PM}={ %{$params{PREREQ_PM} || {}} , %{$params{BUILD_REQUIRES}} }; 44 delete $params{BUILD_REQUIRES}; 45 } 46 delete $params{CONFIGURE_REQUIRES} if $eumm_version < 6.52; 47 delete $params{MIN_PERL_VERSION} if $eumm_version < 6.48; 48 delete $params{META_MERGE} if $eumm_version < 6.46; 49 delete $params{META_ADD} if $eumm_version < 6.46; 50 delete $params{LICENSE} if $eumm_version < 6.31; 51 delete $params{AUTHOR} if $] < 5.005; 52 delete $params{ABSTRACT_FROM} if $] < 5.005; 53 WriteMakefile(%params); 54} 55