Commit | Line | Data |
d4705371 |
1 | use strict; |
b5f5aae4 |
2 | use warnings FATAL => 'all'; |
1a6addf7 |
3 | use 5.006; |
d4705371 |
4 | |
b5f5aae4 |
5 | my %META = ( |
6 | name => 'SQL-Abstract', |
7 | license => 'perl_5', |
743a28db |
8 | dynamic_config => 0, |
b5f5aae4 |
9 | prereqs => { |
10 | configure => { |
11 | requires => { |
12 | 'ExtUtils::MakeMaker' => 0, |
13 | } |
14 | }, |
15 | build => { |
16 | requires => {} |
17 | }, |
18 | test => { |
19 | requires => { |
dfa4d909 |
20 | 'Test::More' => '0.88', |
21 | 'Test::Exception' => '0.31', |
22 | 'Test::Warn' => '0', |
dfa4d909 |
23 | 'Storable' => '0', # for cloning in tests |
b5f5aae4 |
24 | }, |
25 | }, |
26 | runtime => { |
27 | requires => { |
28 | 'List::Util' => '0', |
29 | 'Scalar::Util' => '0', |
30 | 'Exporter' => '5.57', |
31 | 'MRO::Compat' => '0.12', |
32 | 'Moo' => '2.000001', |
33 | 'Sub::Quote' => '2.000001', |
34 | 'Hash::Merge' => '0.12', |
35 | 'Text::Balanced' => '2.00', |
b3ecfcfa |
36 | 'perl' => '5.006', |
cac26be2 |
37 | # Used by SQL::Abstract::Test |
38 | 'Test::Deep' => '0.101', |
39 | 'Test::Builder::Module' => '0.84', |
b5f5aae4 |
40 | }, |
41 | }, |
42 | develop => { |
fe143972 |
43 | requires => { |
44 | 'Test::Pod' => '1.14', |
45 | 'Test::Pod::Coverage' => '1.04', |
46 | 'Pod::Coverage' => '0.19', |
47 | 'Test::EOL' => '1.0', |
48 | 'Test::NoTabs' => '0.9', |
49 | }, |
b5f5aae4 |
50 | }, |
51 | }, |
52 | resources => { |
53 | repository => { |
54 | url => 'https://github.com/dbsrgits/sql-abstract.git', |
55 | web => 'https://github.com/dbsrgits/sql-abstract', |
56 | type => 'git', |
57 | }, |
58 | x_IRC => 'irc://irc.perl.org/#dbix-class', |
59 | bugtracker => { |
60 | web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=SQL-Abstract', |
61 | mailto => 'bug-SQL-Abstract@rt.cpan.org', |
62 | }, |
63 | license => [ 'http://dev.perl.org/licenses/' ], |
64 | }, |
65 | no_index => { |
c33e632e |
66 | package => [ 'DBIx::Class::Storage::Debug::PrettyPrint' ], |
b5f5aae4 |
67 | directory => [ 't', 'xt', 'examples' ], |
68 | }, |
69 | ); |
d4705371 |
70 | |
b5f5aae4 |
71 | my %MM_ARGS = ( |
72 | test => { TESTS => 't/*.t t/*/*.t' }, |
73 | ); |
d4705371 |
74 | |
b5f5aae4 |
75 | ## BOILERPLATE ############################################################### |
76 | require ExtUtils::MakeMaker; |
77 | (do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml'; |
b5f4fb92 |
78 | |
b5f5aae4 |
79 | # have to do this since old EUMM dev releases miss the eval $VERSION line |
80 | my $eumm_version = eval $ExtUtils::MakeMaker::VERSION; |
81 | my $mymeta = $eumm_version >= 6.57_02; |
82 | my $mymeta_broken = $mymeta && $eumm_version < 6.57_07; |
187f46da |
83 | |
b5f5aae4 |
84 | ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g; |
85 | ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g; |
86 | $META{license} = [ $META{license} ] |
87 | if $META{license} && !ref $META{license}; |
88 | $MM_ARGS{LICENSE} = $META{license}[0] |
89 | if $META{license} && $eumm_version >= 6.30; |
90 | $MM_ARGS{NO_MYMETA} = 1 |
91 | if $mymeta_broken; |
92 | $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META } |
93 | unless -f 'META.yml'; |
d4705371 |
94 | |
b5f5aae4 |
95 | for (qw(configure build test runtime)) { |
96 | my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES'; |
97 | my $r = $MM_ARGS{$key} = { |
98 | %{$META{prereqs}{$_}{requires} || {}}, |
99 | %{delete $MM_ARGS{$key} || {}}, |
100 | }; |
101 | defined $r->{$_} or delete $r->{$_} for keys %$r; |
102 | } |
1dc93d17 |
103 | |
b5f5aae4 |
104 | $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0; |
d4705371 |
105 | |
b5f5aae4 |
106 | delete $MM_ARGS{MIN_PERL_VERSION} |
107 | if $eumm_version < 6.47_01; |
108 | $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}} |
109 | if $eumm_version < 6.63_03; |
110 | $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}} |
111 | if $eumm_version < 6.55_01; |
112 | delete $MM_ARGS{CONFIGURE_REQUIRES} |
113 | if $eumm_version < 6.51_03; |
536dbae1 |
114 | |
b5f5aae4 |
115 | ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS); |
116 | ## END BOILERPLATE ########################################################### |