2 use warnings FATAL => 'all';
9 test => { requires => {
12 runtime => { requires => {
13 'Module::Pluggable::Object' => '3.6',
18 url => 'git://git.shadowcat.co.uk/p5sagit/Config-Any.git',
19 web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Config-Any.git;a=summary',
23 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Config-Any',
24 mailto => 'bug-Config-Any@rt.cpan.org',
26 license => [ 'http://dev.perl.org/licenses/' ],
29 directory => [ 't', 'xt' ]
31 x_authority => 'cpan:RATAXIS',
36 (eval { require Config::General } ? ('Config::General' => '2.47') : ()),
40 ## BOILERPLATE ###############################################################
41 require ExtUtils::MakeMaker;
42 (do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
44 # have to do this since old EUMM dev releases miss the eval $VERSION line
45 my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
46 my $mymeta = $eumm_version >= 6.57_02;
47 my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
49 ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
50 ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
51 $META{license} = [ $META{license} ]
52 if $META{license} && !ref $META{license};
53 $MM_ARGS{LICENSE} = $META{license}[0]
54 if $META{license} && $eumm_version >= 6.30;
55 $MM_ARGS{NO_MYMETA} = 1
57 $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
60 for (qw(configure build test runtime)) {
61 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
62 my $r = $MM_ARGS{$key} = {
63 %{$META{prereqs}{$_}{requires} || {}},
64 %{delete $MM_ARGS{$key} || {}},
66 defined $r->{$_} or delete $r->{$_} for keys %$r;
69 $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
71 delete $MM_ARGS{MIN_PERL_VERSION}
72 if $eumm_version < 6.47_01;
73 $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
74 if $eumm_version < 6.63_03;
75 $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
76 if $eumm_version < 6.55_01;
77 delete $MM_ARGS{CONFIGURE_REQUIRES}
78 if $eumm_version < 6.51_03;
80 ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
81 ## END BOILERPLATE ###########################################################