Done long time ago
[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
8name 'DBIx-Class';
ce4c07df 9perl_version '5.006001';
8e0f16f1 10all_from 'lib/DBIx/Class.pm';
ce4c07df 11
3a4251e2 12
d3523053 13test_requires 'Test::Builder' => '0.33';
14test_requires 'Test::Deep' => '0';
15test_requires 'Test::Exception' => '0';
16test_requires 'Test::More' => '0.92';
17test_requires 'Test::Warn' => '0.21';
ce4c07df 18
d3523053 19test_requires 'File::Temp' => '0.22';
4b6337d5 20
a410299d 21
2f8a12ff 22# Core
d3523053 23requires 'List::Util' => '0';
24requires 'Scalar::Util' => '0';
25requires 'Storable' => '0';
2f8a12ff 26
ce4c07df 27# Perl 5.8.0 doesn't have utf8::is_utf8()
d3523053 28requires 'Encode' => '0' if ($] <= 5.008000);
ce4c07df 29
3a4251e2 30# Dependencies (keep in alphabetical order)
d3523053 31requires 'Carp::Clan' => '6.0';
32requires 'Class::Accessor::Grouped' => '0.09000';
33requires 'Class::C3::Componentised' => '1.0005';
34requires 'Class::Inspector' => '1.24';
35requires 'Data::Page' => '2.00';
36requires 'DBD::SQLite' => '1.25';
37requires 'DBI' => '1.605';
38requires 'JSON::Any' => '1.18';
39requires 'MRO::Compat' => '0.09';
40requires 'Module::Find' => '0.06';
41requires 'Path::Class' => '0.16';
42requires 'Scope::Guard' => '0.03';
e80ff1df 43requires 'SQL::Abstract' => '1.58';
d3523053 44requires 'SQL::Abstract::Limit' => '0.13';
45requires 'Sub::Name' => '0.04';
82fae370 46
a410299d 47my %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
56my $sqlt_recommends = '0.11002';
d3523053 57
58recommends 'SQL::Translator' => $sqlt_recommends;
59
82fae370 60my %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 ,
fe650234 113);
114
a410299d 115
116install_script (qw|
117 script/dbicadmin
118|);
119
120tests_recursive (qw|
121 t
122|);
123
124resources 'IRC' => 'irc://irc.perl.org/#dbix-class';
125resources 'license' => 'http://dev.perl.org/licenses/';
126resources 'repository' => 'http://dev.catalyst.perl.org/svnweb/bast/browse/DBIx-Class/';
127resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class';
128
dc5460a7 129no_index 'DBIx::Class::Storage::DBI::Sybase::Base';
130no_index 'DBIx::Class::SQLAHacks';
131no_index 'DBIx::Class::SQLAHacks::MSSQL';
132no_index 'DBIx::Class::Storage::DBI::AmbiguousGlob';
133no_index 'DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server';
134no_index 'DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server::NoBindVars';
a410299d 135
136# re-build README and require extra modules for testing if we're in a checkout
137
fe650234 138if ($Module::Install::AUTHOR) {
d7fda552 139 warn <<'EOW';
140******************************************************************************
141******************************************************************************
142*** ***
143*** AUTHOR MODE: all optional test dependencies converted to hard requires ***
144*** ***
145******************************************************************************
146******************************************************************************
147
148EOW
80ff5ae0 149
3a4251e2 150 foreach my $module (sort keys %force_requires_if_author) {
80ff5ae0 151 build_requires ($module => $force_requires_if_author{$module});
152 }
153
7ff18dbd 154 print "Regenerating README\n";
80ff5ae0 155 system('pod2text lib/DBIx/Class.pm > README');
3e110410 156
7ff18dbd 157 if (-f 'MANIFEST') {
158 print "Removing MANIFEST\n";
159 unlink 'MANIFEST';
160 }
044e70c7 161
a410299d 162# require Module::Install::Pod::Inherit;
163# PodInherit();
7ff18dbd 164}
80ff5ae0 165
7ff18dbd 166auto_install();
269228af 167
713cc98e 168WriteAll();
269228af 169
80ff5ae0 170# Re-write META.yml to _exclude_ all forced requires (we do not want to ship this)
713cc98e 171if ($Module::Install::AUTHOR) {
80ff5ae0 172
173 Meta->{values}{build_requires} = [ grep
174 { not exists $force_requires_if_author{$_->[0]} }
175 ( @{Meta->{values}{build_requires}} )
176 ];
177
713cc98e 178 Meta->write;
179}