Commit | Line | Data |
89b5b1c5 |
1 | use inc::Module::Install 0.89; |
fe650234 |
2 | use strict; |
3 | use warnings; |
76607ac8 |
4 | use POSIX (); |
fe650234 |
5 | |
6 | use 5.006001; # delete this line if you want to send patches for earlier. |
ce4c07df |
7 | |
93c50889 |
8 | # ****** DO NOT ADD OPTIONAL DEPENDENCIES. EVER. --mst ****** |
9 | |
ce4c07df |
10 | name 'DBIx-Class'; |
ce4c07df |
11 | perl_version '5.006001'; |
8e0f16f1 |
12 | all_from 'lib/DBIx/Class.pm'; |
ce4c07df |
13 | |
3a4251e2 |
14 | |
d3523053 |
15 | test_requires 'Test::Builder' => '0.33'; |
16 | test_requires 'Test::Deep' => '0'; |
17 | test_requires 'Test::Exception' => '0'; |
18 | test_requires 'Test::More' => '0.92'; |
19 | test_requires 'Test::Warn' => '0.21'; |
ce4c07df |
20 | |
d3523053 |
21 | test_requires 'File::Temp' => '0.22'; |
4b6337d5 |
22 | |
a410299d |
23 | |
2f8a12ff |
24 | # Core |
d3523053 |
25 | requires 'List::Util' => '0'; |
26 | requires 'Scalar::Util' => '0'; |
27 | requires 'Storable' => '0'; |
ce4c07df |
28 | |
ce4c07df |
29 | # Perl 5.8.0 doesn't have utf8::is_utf8() |
d3523053 |
30 | requires 'Encode' => '0' if ($] <= 5.008000); |
d9a898ca |
31 | |
3a4251e2 |
32 | # Dependencies (keep in alphabetical order) |
d3523053 |
33 | requires 'Carp::Clan' => '6.0'; |
34 | requires 'Class::Accessor::Grouped' => '0.09000'; |
35 | requires 'Class::C3::Componentised' => '1.0005'; |
36 | requires 'Class::Inspector' => '1.24'; |
37 | requires 'Data::Page' => '2.00'; |
38 | requires 'DBD::SQLite' => '1.25'; |
39 | requires 'DBI' => '1.605'; |
40 | requires 'JSON::Any' => '1.18'; |
41 | requires 'MRO::Compat' => '0.09'; |
42 | requires 'Module::Find' => '0.06'; |
43 | requires 'Path::Class' => '0.16'; |
44 | requires 'Scope::Guard' => '0.03'; |
e80ff1df |
45 | requires 'SQL::Abstract' => '1.58'; |
d3523053 |
46 | requires 'SQL::Abstract::Limit' => '0.13'; |
47 | requires 'Sub::Name' => '0.04'; |
82fae370 |
48 | |
a410299d |
49 | my %replication_requires = ( |
d3523053 |
50 | 'Moose', => '0.87', |
51 | 'MooseX::AttributeHelpers' => '0.21', |
52 | 'MooseX::Types', => '0.16', |
53 | 'namespace::clean' => '0.11', |
54 | 'Hash::Merge', => '0.11', |
a410299d |
55 | ); |
fe650234 |
56 | |
7f6f5b69 |
57 | # when changing also adjust $DBIx::Class::minimum_sqlt_version |
58 | my $sqlt_recommends = '0.11002'; |
d3523053 |
59 | |
82fae370 |
60 | my %force_requires_if_author = ( |
a410299d |
61 | %replication_requires, |
62 | |
d3523053 |
63 | # 'Module::Install::Pod::Inherit' => '0.01', |
d3523053 |
64 | 'SQL::Translator' => $sqlt_recommends, |
9ac2c0f8 |
65 | |
dc4600b2 |
66 | # when changing also adjust version in t/02pod.t |
67 | 'Test::Pod' => '1.26', |
68 | |
69 | # when changing also adjust version in t/03podcoverage.t |
70 | 'Test::Pod::Coverage' => '1.08', |
71 | 'Pod::Coverage' => '0.20', |
72 | |
9ac2c0f8 |
73 | # CDBI-compat related |
d3523053 |
74 | 'DBIx::ContextualFetch' => '0', |
75 | 'Class::DBI::Plugin::DeepAbstractSearch' => '0', |
76 | 'Class::Trigger' => '0', |
77 | 'Time::Piece::MySQL' => '0', |
78 | 'Clone' => '0', |
79 | 'Date::Simple' => '3.03', |
9ac2c0f8 |
80 | |
81 | # t/52cycle.t |
d3523053 |
82 | 'Test::Memory::Cycle' => '0', |
83 | 'Devel::Cycle' => '1.10', |
9ac2c0f8 |
84 | |
40f75181 |
85 | # t/36datetime.t |
c96454c3 |
86 | # t/60core.t |
d3523053 |
87 | 'DateTime::Format::SQLite' => '0', |
5fc1107f |
88 | |
40f75181 |
89 | # t/96_is_deteministic_value.t |
d3523053 |
90 | 'DateTime::Format::Strptime'=> '0', |
40f75181 |
91 | |
3a4251e2 |
92 | # database-dependent reqs |
93 | # |
9d2b098e |
94 | $ENV{DBICTEST_PG_DSN} |
3a4251e2 |
95 | ? ( |
d3523053 |
96 | 'Sys::SigAction' => '0', |
97 | 'DBD::Pg' => '2.009002', |
98 | 'DateTime::Format::Pg' => '0', |
3a4251e2 |
99 | ) : () |
9d2b098e |
100 | , |
101 | |
3a4251e2 |
102 | $ENV{DBICTEST_MYSQL_DSN} |
103 | ? ( |
d3523053 |
104 | 'DateTime::Format::MySQL' => '0', |
3a4251e2 |
105 | ) : () |
106 | , |
c96454c3 |
107 | |
3a4251e2 |
108 | $ENV{DBICTEST_ORACLE_DSN} |
109 | ? ( |
d3523053 |
110 | 'DateTime::Format::Oracle' => '0', |
3a4251e2 |
111 | ) : () |
112 | , |
52d9416d |
113 | |
114 | $ENV{DBICTEST_SYBASE_DSN} |
115 | ? ( |
116 | 'DateTime::Format::Sybase' => 0, |
117 | ) : () |
118 | , |
fe650234 |
119 | ); |
120 | |
a410299d |
121 | |
122 | install_script (qw| |
123 | script/dbicadmin |
124 | |); |
125 | |
126 | tests_recursive (qw| |
127 | t |
128 | |); |
129 | |
130 | resources 'IRC' => 'irc://irc.perl.org/#dbix-class'; |
131 | resources 'license' => 'http://dev.perl.org/licenses/'; |
132 | resources 'repository' => 'http://dev.catalyst.perl.org/svnweb/bast/browse/DBIx-Class/'; |
133 | resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class'; |
134 | |
2f92e90b |
135 | no_index 'DBIx::Class::Storage::DBI::Sybase::Common'; |
dc5460a7 |
136 | no_index 'DBIx::Class::SQLAHacks'; |
137 | no_index 'DBIx::Class::SQLAHacks::MSSQL'; |
138 | no_index 'DBIx::Class::Storage::DBI::AmbiguousGlob'; |
139 | no_index 'DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server'; |
140 | no_index 'DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server::NoBindVars'; |
a410299d |
141 | |
142 | # re-build README and require extra modules for testing if we're in a checkout |
143 | |
fe650234 |
144 | if ($Module::Install::AUTHOR) { |
d7fda552 |
145 | warn <<'EOW'; |
146 | ****************************************************************************** |
147 | ****************************************************************************** |
148 | *** *** |
149 | *** AUTHOR MODE: all optional test dependencies converted to hard requires *** |
150 | *** *** |
151 | ****************************************************************************** |
152 | ****************************************************************************** |
153 | |
154 | EOW |
269228af |
155 | |
3a4251e2 |
156 | foreach my $module (sort keys %force_requires_if_author) { |
80ff5ae0 |
157 | build_requires ($module => $force_requires_if_author{$module}); |
158 | } |
269228af |
159 | |
7ff18dbd |
160 | print "Regenerating README\n"; |
80ff5ae0 |
161 | system('pod2text lib/DBIx/Class.pm > README'); |
269228af |
162 | |
7ff18dbd |
163 | if (-f 'MANIFEST') { |
164 | print "Removing MANIFEST\n"; |
165 | unlink 'MANIFEST'; |
166 | } |
044e70c7 |
167 | |
a410299d |
168 | # require Module::Install::Pod::Inherit; |
169 | # PodInherit(); |
7ff18dbd |
170 | } |
269228af |
171 | |
7ff18dbd |
172 | auto_install(); |
09d46657 |
173 | |
713cc98e |
174 | WriteAll(); |
09d46657 |
175 | |
80ff5ae0 |
176 | # Re-write META.yml to _exclude_ all forced requires (we do not want to ship this) |
713cc98e |
177 | if ($Module::Install::AUTHOR) { |
713cc98e |
178 | |
80ff5ae0 |
179 | Meta->{values}{build_requires} = [ grep |
180 | { not exists $force_requires_if_author{$_->[0]} } |
181 | ( @{Meta->{values}{build_requires}} ) |
182 | ]; |
713cc98e |
183 | |
713cc98e |
184 | Meta->write; |
09d46657 |
185 | } |