update git repo url
[p5sagit/Config-Any.git] / Makefile.PL
CommitLineData
88fedacf 1use strict;
2use warnings FATAL => 'all';
3use 5.006;
e23825ec 4
88fedacf 5my %META = (
6 name => 'Config-Any',
7 license => 'perl_5',
8 prereqs => {
9 test => { requires => {
10 'Test::More' => 0,
11 } },
cc97e845 12 runtime => {
13 requires => {
14 'Module::Pluggable::Object' => '3.6',
15 },
16 suggests => {
3adc3480 17 'Config::General' => '2.48',
cc97e845 18 'Config::Tiny' => 0,
19 'Cpanel::JSON::XS' => 0,
20 'XML::Simple' => 0,
21 'XML::NamespaceSupport' => 0,
22 'YAML::XS' => 0,
23 },
24 },
25 develop => {
26 requires => {
3adc3480 27 'Config::General' => '2.48',
cc97e845 28 'Config::Tiny' => 0,
29 'Cpanel::JSON::XS' => 0,
30 'XML::Simple' => 0,
31 'XML::NamespaceSupport' => 0,
32 'YAML::XS' => 0,
33 'Test::Pod' => 0,
34 'Test::Pod::Coverage' => 0,
35 },
36 },
88fedacf 37 },
38 resources => {
39 repository => {
8c6349de 40 url => 'https://github.com/p5sagit/Config-Any.git',
41 web => 'https://github.com/p5sagit/Config-Any',
88fedacf 42 type => 'git',
43 },
44 bugtracker => {
45 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Config-Any',
46 mailto => 'bug-Config-Any@rt.cpan.org',
47 },
48 license => [ 'http://dev.perl.org/licenses/' ],
49 },
50 no_index => {
51 directory => [ 't', 'xt' ]
52 },
53 x_authority => 'cpan:RATAXIS',
54);
5f5b9e4c 55
88fedacf 56my %MM_ARGS = (
57 PREREQ_PM => {
3adc3480 58 (eval { require Config::General } ? (
59 'Config::General' => $META{prereqs}{runtime}{suggests}{'Config::General'}
60 ) : ()),
88fedacf 61 },
62);
f0e3c221 63
88fedacf 64## BOILERPLATE ###############################################################
65require ExtUtils::MakeMaker;
66(do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
f0e3c221 67
88fedacf 68# have to do this since old EUMM dev releases miss the eval $VERSION line
69my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
70my $mymeta = $eumm_version >= 6.57_02;
71my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
e3c5f84b 72
88fedacf 73($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
74($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
75$META{license} = [ $META{license} ]
76 if $META{license} && !ref $META{license};
77$MM_ARGS{LICENSE} = $META{license}[0]
78 if $META{license} && $eumm_version >= 6.30;
79$MM_ARGS{NO_MYMETA} = 1
80 if $mymeta_broken;
81$MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
82 unless -f 'META.yml';
f0e3c221 83
88fedacf 84for (qw(configure build test runtime)) {
85 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
86 my $r = $MM_ARGS{$key} = {
87 %{$META{prereqs}{$_}{requires} || {}},
88 %{delete $MM_ARGS{$key} || {}},
89 };
90 defined $r->{$_} or delete $r->{$_} for keys %$r;
e3c5f84b 91}
92
88fedacf 93$MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
94
95delete $MM_ARGS{MIN_PERL_VERSION}
96 if $eumm_version < 6.47_01;
97$MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
98 if $eumm_version < 6.63_03;
99$MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
100 if $eumm_version < 6.55_01;
101delete $MM_ARGS{CONFIGURE_REQUIRES}
102 if $eumm_version < 6.51_03;
45758652 103
88fedacf 104ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
105## END BOILERPLATE ###########################################################