Commit | Line | Data |
9d42b191 |
1 | use strict; |
2 | use warnings; |
3 | |
4 | use ExtUtils::MakeMaker; |
5 | |
6 | my %build_requires => ( |
7 | 'Test::More' => 0, |
8 | ); |
9 | |
10 | my %requires = ( |
11 | 'Moo' => 0.009013, |
12 | 'File::Path' => 0, |
13 | 'File::Basename' => 0, |
14 | 'Module::Runtime' => 0, |
15 | 'Data::YAML::Writer' => 0, |
16 | 'Object::Remote' => 0, |
17 | 'Object::Remote::Future' => 0, |
18 | 'Config::General' => 0, |
19 | 'Pod::Usage' => 0, |
20 | 'Getopt::Long' => 0, |
21 | 'Digest::SHA' => 0, |
22 | 'strictures' => 1, |
23 | 'IPC::Run' => 0, |
24 | ) |
25 | |
26 | # have to do this since old EUMM dev releases miss the eval $VERSION line |
27 | my $mymeta_works = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.5707 }; |
28 | my $mymeta = do { no warnings; $ExtUtils::MakeMaker::VERSION >= 6.5702 }; |
29 | |
30 | WriteMakefile( |
31 | NAME => 'File-Tree-Snapshot', |
32 | VERSION_FROM => 'lib/File/Tree/Snapshot.pm', |
33 | PREREQ_PM => { |
34 | %requires, |
35 | ($] >= 5.010 ? () : ('MRO::Compat' => 0)), |
36 | ($mymeta_works ? () : (%build_requires)), |
37 | }, |
38 | ($mymeta_works |
39 | ? ( # BUILD_REQUIRES makes MYMETA right, requires stops META being wrong |
40 | BUILD_REQUIRES => \%build_requires, |
41 | META_ADD => { requires => \%requires } |
42 | ) |
43 | : ( # META_ADD both to get META right - only Makefile written |
44 | META_ADD => { |
45 | requires => \%requires, |
46 | build_requires => \%build_requires, |
47 | } |
48 | ) |
49 | ), |
50 | ($mymeta && !$mymeta_works ? (NO_MYMETA => 1) : ()), |
51 | LICENSE => 'perl', |
52 | );; |