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