correct MYMETA handling on older EUMM releases
[gitmo/Role-Tiny.git] / Makefile.PL
1 use strict;
2 use warnings FATAL => 'all';
3 use 5.006;
4 use ExtUtils::MakeMaker;
5 (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
6
7 my %BUILD_DEPS = (
8   'Test::More' => 0.96,
9   'Test::Fatal' => 0.003,
10 );
11
12 # have to do this since old EUMM dev releases miss the eval $VERSION line
13 my $mymeta = eval($ExtUtils::MakeMaker::VERSION) >= 6.57_02;
14 my $mymeta_works = eval($ExtUtils::MakeMaker::VERSION) >= 6.57_07;
15
16 WriteMakefile(
17   NAME => 'Role::Tiny',
18   VERSION_FROM => 'lib/Role/Tiny.pm',
19   PREREQ_PM => {
20     Exporter => '5.57',
21     ($] >= 5.010 ? () : ('MRO::Compat' => 0)),
22     ($mymeta_works ? () : (%BUILD_DEPS)),
23   },
24   $mymeta_works ? (BUILD_REQUIRES => \%BUILD_DEPS) : (),
25   ($mymeta && !$mymeta_works ? (NO_MYMETA => 1) : ()),
26
27   -f 'META.yml' ? () : (META_MERGE => {
28     'meta-spec' => { version => 2 },
29     no_index => {
30       directory => [ 'xt' ]
31     },
32     resources => {
33       # r/w: gitmo@git.shadowcat.co.uk:Role-Tiny.git
34       repository => {
35         url => 'git://git.shadowcat.co.uk/gitmo/Role-Tiny.git',
36         web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo/Role-Tiny.git',
37         type => 'git',
38       },
39       bugtracker => {
40           mailto => 'bug-Role-Tiny@rt.cpan.org',
41           web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Role-Tiny',
42       },
43     },
44   }),
45 );