Release commit for 1.003003
[p5sagit/Eval-WithLexicals.git] / Makefile.PL
CommitLineData
b243c437 1use strict;
2use warnings FATAL => 'all';
f7759258 3use 5.008;
4
5my %META = (
6 name => 'Eval-WithLexicals',
7 license => 'perl_5',
8 prereqs => {
9 configure => { requires => {
10 'ExtUtils::MakeMaker' => 0,
11 } },
12 test => {
13 requires => {
14 'Test::More' => 0.94,
15 'strictures' => 1,
16 },
17 },
18 runtime => {
19 requires => {
20 'Moo' => '0.009006',
254709e5 21 'perl' => 5.008,
f7759258 22 },
23 },
24 },
25 resources => {
26 repository => {
27 url => 'git://git.shadowcat.co.uk/p5sagit/Eval-WithLexicals',
28 web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Eval-WithLexicals.git',
29 type => 'git',
30 },
31 bugtracker => {
32 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Eval-WithLexicals',
33 mailto => 'bug-Eval-WithLexicals@rt.cpan.org',
34 },
35 license => [ 'http://dev.perl.org/licenses/' ],
36 },
37 no_index => {
38 directory => [ 't', 'xt' ]
39 },
40 x_authority => 'cpan:MSTROUT',
41);
42
43my %MM_ARGS = (
b243c437 44 EXE_FILES => [ 'bin/tinyrepl' ],
45);
f7759258 46
de16a67b 47## BOILERPLATE ###############################################################
f7759258 48require ExtUtils::MakeMaker;
49(do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
50
51# have to do this since old EUMM dev releases miss the eval $VERSION line
52my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
53my $mymeta = $eumm_version >= 6.57_02;
54my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
55
56($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
57($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
de16a67b 58$META{license} = [ $META{license} ]
59 if $META{license} && !ref $META{license};
60$MM_ARGS{LICENSE} = $META{license}[0]
61 if $META{license} && $eumm_version >= 6.30;
f7759258 62$MM_ARGS{NO_MYMETA} = 1
63 if $mymeta_broken;
64$MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
65 unless -f 'META.yml';
66
67for (qw(configure build test runtime)) {
68 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
69 my $r = $MM_ARGS{$key} = {
70 %{$META{prereqs}{$_}{requires} || {}},
71 %{delete $MM_ARGS{$key} || {}},
72 };
73 defined $r->{$_} or delete $r->{$_} for keys %$r;
74}
75
76$MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
77
78delete $MM_ARGS{MIN_PERL_VERSION}
79 if $eumm_version < 6.47_01;
80$MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
81 if $eumm_version < 6.63_03;
82$MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
83 if $eumm_version < 6.55_01;
84delete $MM_ARGS{CONFIGURE_REQUIRES}
85 if $eumm_version < 6.51_03;
86
87ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
de16a67b 88## END BOILERPLATE ###########################################################