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