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