Changelog for Makefile.PL fix
[catagits/Web-Simple.git] / Makefile.PL
1 use strict;
2 use warnings FATAL => 'all';
3 use 5.008001;
4 use ExtUtils::MakeMaker;
5
6 (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
7
8 my %WriteMakefileArgs = (
9   NAME => 'Web::Simple',
10   VERSION_FROM => 'lib/Web/Simple.pm',
11
12   META_MERGE => {
13     'meta-spec' => { version => 2 },
14     dynamic_config => 0,
15     resources => {
16       # r/w: p5sagit@git.shadowcat.co.uk:Web-Simple.git
17       repository => {
18         url => 'git://git.shadowcat.co.uk/p5sagit/Web-Simple.git',
19         web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Web-Simple.git',
20         type => 'git',
21       },
22       bugtracker => {
23           mailto => 'bug-Web-Simple@rt.cpan.org',
24           web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Web-Simple',
25       },
26     },
27   },
28
29   META_ADD => {
30     prereqs => {
31       runtime => {
32         requires => {
33           'Syntax::Keyword::Gather' => '1.001',
34           'Plack' => '0.9968',
35           'Moo' => '0.009014',
36           'warnings::illegalproto' => '0.001',
37           'Data::Dumper::Concise' => '2.020',
38           'perl' => '5.006',
39         },
40       },
41     },
42   },
43   realclean => { FILES => [ 'Distar/', 'MANIFEST*' ] },
44 );
45
46 my $eumm_version  = eval $ExtUtils::MakeMaker::VERSION;
47
48 for (qw(configure build test runtime)) {
49   my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
50   next unless exists $WriteMakefileArgs{META_ADD}{prereqs}{$_}
51            or exists $WriteMakefileArgs{$key};
52   my $r = $WriteMakefileArgs{$key} = {
53     %{$WriteMakefileArgs{META_ADD}{prereqs}{$_}{requires} || {}},
54     %{delete $WriteMakefileArgs{$key} || {}},
55   };
56   defined $r->{$_} or delete $r->{$_} for keys %$r;
57 }
58
59 # dynamic prereqs get added here.
60
61 $WriteMakefileArgs{MIN_PERL_VERSION} = delete $WriteMakefileArgs{PREREQ_PM}{perl} || 0;
62
63 $WriteMakefileArgs{BUILD_REQUIRES} = {
64     %{$WriteMakefileArgs{BUILD_REQUIRES} || {}},
65     %{delete $WriteMakefileArgs{TEST_REQUIRES}}
66 } if $eumm_version < 6.63_03;
67
68 $WriteMakefileArgs{PREREQ_PM} = {
69     %{$WriteMakefileArgs{PREREQ_PM}},
70     %{delete $WriteMakefileArgs{BUILD_REQUIRES}}
71 } if $eumm_version < 6.55_01;
72
73 delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
74   if $eumm_version < 6.51_03;
75
76 WriteMakefile(%WriteMakefileArgs);