remove Module::Load from test suite
[dbsrgits/DBIx-Class.git] / Makefile.PL
CommitLineData
89b5b1c5 1use inc::Module::Install 0.89;
fe650234 2use strict;
3use warnings;
76607ac8 4use POSIX ();
fe650234 5
6use 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 10name 'DBIx-Class';
ce4c07df 11perl_version '5.006001';
8e0f16f1 12all_from 'lib/DBIx/Class.pm';
ce4c07df 13
3a4251e2 14
d3523053 15test_requires 'Test::Builder' => '0.33';
16test_requires 'Test::Deep' => '0';
17test_requires 'Test::Exception' => '0';
18test_requires 'Test::More' => '0.92';
19test_requires 'Test::Warn' => '0.21';
ce4c07df 20
d3523053 21test_requires 'File::Temp' => '0.22';
4b6337d5 22
f0c34490 23test_requires 'Module::Load' => '0.16';
24
a410299d 25
2f8a12ff 26# Core
d3523053 27requires 'List::Util' => '0';
28requires 'Scalar::Util' => '0';
29requires 'Storable' => '0';
ce4c07df 30
ce4c07df 31# Perl 5.8.0 doesn't have utf8::is_utf8()
d3523053 32requires 'Encode' => '0' if ($] <= 5.008000);
d9a898ca 33
3a4251e2 34# Dependencies (keep in alphabetical order)
d3523053 35requires 'Carp::Clan' => '6.0';
36requires 'Class::Accessor::Grouped' => '0.09000';
37requires 'Class::C3::Componentised' => '1.0005';
38requires 'Class::Inspector' => '1.24';
39requires 'Data::Page' => '2.00';
40requires 'DBD::SQLite' => '1.25';
41requires 'DBI' => '1.605';
42requires 'JSON::Any' => '1.18';
43requires 'MRO::Compat' => '0.09';
44requires 'Module::Find' => '0.06';
45requires 'Path::Class' => '0.16';
46requires 'Scope::Guard' => '0.03';
517f9130 47requires 'SQL::Abstract' => '1.60';
d3523053 48requires 'SQL::Abstract::Limit' => '0.13';
49requires 'Sub::Name' => '0.04';
68628159 50requires 'Data::Dumper::Concise' => '1.000';
82fae370 51
a410299d 52my %replication_requires = (
d3523053 53 'Moose', => '0.87',
54 'MooseX::AttributeHelpers' => '0.21',
55 'MooseX::Types', => '0.16',
56 'namespace::clean' => '0.11',
57 'Hash::Merge', => '0.11',
a410299d 58);
fe650234 59
f0c34490 60my %admin_requires = (
61 'Moose', => '0.87',
62 'MooseX::Types', => '0.16',
63 'MooseX::Types::Path::Class' => '0.05',
64 'MooseX::Types::JSON' => '0.02',
65 'Try::Tiny' => '0.02',
66 'namespace::clean' => '0.11',
67 'parent' => '0.223',
68 'JSON::Any' => '0',
69 'Getopt::Long::Descriptive' => '0.081',
70);
71
3c44586e 72#************************************************************************#
73# Make *ABSOLUTELY SURE* that nothing on this list is a real require, #
74# since every module listed in %force_requires_if_author is deleted #
75# from the final META.yml (thus will never make it as a CPAN dependency) #
76#************************************************************************#
82fae370 77my %force_requires_if_author = (
a410299d 78 %replication_requires,
f0c34490 79 %admin_requires,
b2b2e7fd 80 # when changing also adjust $DBIx::Class::Storage::DBI::minimum_sqlt_version
3c44586e 81 'SQL::Translator' => '0.11002',
82
d3523053 83# 'Module::Install::Pod::Inherit' => '0.01',
9ac2c0f8 84
dc4600b2 85 # when changing also adjust version in t/02pod.t
86 'Test::Pod' => '1.26',
87
88 # when changing also adjust version in t/03podcoverage.t
89 'Test::Pod::Coverage' => '1.08',
90 'Pod::Coverage' => '0.20',
91
9ac2c0f8 92 # CDBI-compat related
d3523053 93 'DBIx::ContextualFetch' => '0',
94 'Class::DBI::Plugin::DeepAbstractSearch' => '0',
95 'Class::Trigger' => '0',
96 'Time::Piece::MySQL' => '0',
97 'Clone' => '0',
98 'Date::Simple' => '3.03',
9ac2c0f8 99
100 # t/52cycle.t
d3523053 101 'Test::Memory::Cycle' => '0',
102 'Devel::Cycle' => '1.10',
9ac2c0f8 103
40f75181 104 # t/36datetime.t
c96454c3 105 # t/60core.t
d3523053 106 'DateTime::Format::SQLite' => '0',
5fc1107f 107
40f75181 108 # t/96_is_deteministic_value.t
d3523053 109 'DateTime::Format::Strptime'=> '0',
40f75181 110
3a4251e2 111 # database-dependent reqs
112 #
9d2b098e 113 $ENV{DBICTEST_PG_DSN}
3a4251e2 114 ? (
d3523053 115 'Sys::SigAction' => '0',
116 'DBD::Pg' => '2.009002',
117 'DateTime::Format::Pg' => '0',
3a4251e2 118 ) : ()
9d2b098e 119 ,
120
3a4251e2 121 $ENV{DBICTEST_MYSQL_DSN}
122 ? (
d3523053 123 'DateTime::Format::MySQL' => '0',
3a4251e2 124 ) : ()
125 ,
c96454c3 126
d0f52dd4 127 $ENV{DBICTEST_ORA_DSN}
3a4251e2 128 ? (
d3523053 129 'DateTime::Format::Oracle' => '0',
3a4251e2 130 ) : ()
131 ,
d867eeda 132
133 $ENV{DBICTEST_SYBASE_DSN}
134 ? (
135 'DateTime::Format::Sybase' => 0,
136 ) : ()
137 ,
fe650234 138);
3c44586e 139#************************************************************************#
4256480a 140# Make ABSOLUTELY SURE that nothing on the list above is a real require, #
3c44586e 141# since every module listed in %force_requires_if_author is deleted #
142# from the final META.yml (thus will never make it as a CPAN dependency) #
143#************************************************************************#
fe650234 144
a410299d 145
146install_script (qw|
147 script/dbicadmin
148|);
149
150tests_recursive (qw|
151 t
152|);
153
154resources 'IRC' => 'irc://irc.perl.org/#dbix-class';
155resources 'license' => 'http://dev.perl.org/licenses/';
1d682114 156resources 'repository' => 'http://dev.catalyst.perl.org/repos/bast/DBIx-Class/';
a410299d 157resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class';
158
dc5460a7 159no_index 'DBIx::Class::SQLAHacks';
160no_index 'DBIx::Class::SQLAHacks::MSSQL';
fc47d070 161no_index 'DBIx::Class::SQLAHacks::OracleJoins';
dc5460a7 162no_index 'DBIx::Class::Storage::DBI::AmbiguousGlob';
c443438f 163no_index 'DBIx::Class::Storage::DBIHacks';
fc47d070 164no_index 'DBIx::Class::PK::Auto::DB2';
165no_index 'DBIx::Class::PK::Auto::MSSQL';
166no_index 'DBIx::Class::PK::Auto::MySQL';
167no_index 'DBIx::Class::PK::Auto::Oracle';
168no_index 'DBIx::Class::PK::Auto::Pg';
169no_index 'DBIx::Class::PK::Auto::SQLite';
a410299d 170
171# re-build README and require extra modules for testing if we're in a checkout
172
fe650234 173if ($Module::Install::AUTHOR) {
d7fda552 174 warn <<'EOW';
175******************************************************************************
176******************************************************************************
177*** ***
178*** AUTHOR MODE: all optional test dependencies converted to hard requires ***
179*** ***
180******************************************************************************
181******************************************************************************
182
183EOW
269228af 184
3a4251e2 185 foreach my $module (sort keys %force_requires_if_author) {
80ff5ae0 186 build_requires ($module => $force_requires_if_author{$module});
187 }
269228af 188
7ff18dbd 189 print "Regenerating README\n";
80ff5ae0 190 system('pod2text lib/DBIx/Class.pm > README');
269228af 191
7ff18dbd 192 if (-f 'MANIFEST') {
193 print "Removing MANIFEST\n";
194 unlink 'MANIFEST';
195 }
044e70c7 196
a410299d 197# require Module::Install::Pod::Inherit;
198# PodInherit();
7ff18dbd 199}
269228af 200
7ff18dbd 201auto_install();
09d46657 202
713cc98e 203WriteAll();
09d46657 204
80ff5ae0 205# Re-write META.yml to _exclude_ all forced requires (we do not want to ship this)
713cc98e 206if ($Module::Install::AUTHOR) {
713cc98e 207
80ff5ae0 208 Meta->{values}{build_requires} = [ grep
209 { not exists $force_requires_if_author{$_->[0]} }
210 ( @{Meta->{values}{build_requires}} )
211 ];
713cc98e 212
713cc98e 213 Meta->write;
09d46657 214}