this would break in the future - sanitize sql fed to the tester
[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
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';
e80ff1df 45requires 'SQL::Abstract' => '1.58';
d3523053 46requires 'SQL::Abstract::Limit' => '0.13';
47requires 'Sub::Name' => '0.04';
82fae370 48
a410299d 49my %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
3c44586e 57#************************************************************************#
58# Make *ABSOLUTELY SURE* that nothing on this list is a real require, #
59# since every module listed in %force_requires_if_author is deleted #
60# from the final META.yml (thus will never make it as a CPAN dependency) #
61#************************************************************************#
82fae370 62my %force_requires_if_author = (
a410299d 63 %replication_requires,
64
b2b2e7fd 65 # when changing also adjust $DBIx::Class::Storage::DBI::minimum_sqlt_version
3c44586e 66 'SQL::Translator' => '0.11002',
67
d3523053 68# 'Module::Install::Pod::Inherit' => '0.01',
9ac2c0f8 69
dc4600b2 70 # when changing also adjust version in t/02pod.t
71 'Test::Pod' => '1.26',
72
73 # when changing also adjust version in t/03podcoverage.t
74 'Test::Pod::Coverage' => '1.08',
75 'Pod::Coverage' => '0.20',
76
9ac2c0f8 77 # CDBI-compat related
d3523053 78 'DBIx::ContextualFetch' => '0',
79 'Class::DBI::Plugin::DeepAbstractSearch' => '0',
80 'Class::Trigger' => '0',
81 'Time::Piece::MySQL' => '0',
82 'Clone' => '0',
83 'Date::Simple' => '3.03',
9ac2c0f8 84
85 # t/52cycle.t
d3523053 86 'Test::Memory::Cycle' => '0',
87 'Devel::Cycle' => '1.10',
9ac2c0f8 88
40f75181 89 # t/36datetime.t
c96454c3 90 # t/60core.t
d3523053 91 'DateTime::Format::SQLite' => '0',
5fc1107f 92
40f75181 93 # t/96_is_deteministic_value.t
d3523053 94 'DateTime::Format::Strptime'=> '0',
40f75181 95
3a4251e2 96 # database-dependent reqs
97 #
9d2b098e 98 $ENV{DBICTEST_PG_DSN}
3a4251e2 99 ? (
d3523053 100 'Sys::SigAction' => '0',
101 'DBD::Pg' => '2.009002',
102 'DateTime::Format::Pg' => '0',
3a4251e2 103 ) : ()
9d2b098e 104 ,
105
3a4251e2 106 $ENV{DBICTEST_MYSQL_DSN}
107 ? (
d3523053 108 'DateTime::Format::MySQL' => '0',
3a4251e2 109 ) : ()
110 ,
c96454c3 111
3a4251e2 112 $ENV{DBICTEST_ORACLE_DSN}
113 ? (
d3523053 114 'DateTime::Format::Oracle' => '0',
3a4251e2 115 ) : ()
116 ,
fe650234 117);
3c44586e 118#************************************************************************#
4256480a 119# Make ABSOLUTELY SURE that nothing on the list above is a real require, #
3c44586e 120# since every module listed in %force_requires_if_author is deleted #
121# from the final META.yml (thus will never make it as a CPAN dependency) #
122#************************************************************************#
fe650234 123
a410299d 124
125install_script (qw|
126 script/dbicadmin
127|);
128
129tests_recursive (qw|
130 t
131|);
132
133resources 'IRC' => 'irc://irc.perl.org/#dbix-class';
134resources 'license' => 'http://dev.perl.org/licenses/';
135resources 'repository' => 'http://dev.catalyst.perl.org/svnweb/bast/browse/DBIx-Class/';
136resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class';
137
26283ee3 138no_index 'DBIx::Class::Storage::DBI::Sybase::Base';
dc5460a7 139no_index 'DBIx::Class::SQLAHacks';
140no_index 'DBIx::Class::SQLAHacks::MSSQL';
141no_index 'DBIx::Class::Storage::DBI::AmbiguousGlob';
142no_index 'DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server';
143no_index 'DBIx::Class::Storage::DBI::Sybase::Microsoft_SQL_Server::NoBindVars';
a410299d 144
145# re-build README and require extra modules for testing if we're in a checkout
146
fe650234 147if ($Module::Install::AUTHOR) {
d7fda552 148 warn <<'EOW';
149******************************************************************************
150******************************************************************************
151*** ***
152*** AUTHOR MODE: all optional test dependencies converted to hard requires ***
153*** ***
154******************************************************************************
155******************************************************************************
156
157EOW
269228af 158
3a4251e2 159 foreach my $module (sort keys %force_requires_if_author) {
80ff5ae0 160 build_requires ($module => $force_requires_if_author{$module});
161 }
269228af 162
7ff18dbd 163 print "Regenerating README\n";
80ff5ae0 164 system('pod2text lib/DBIx/Class.pm > README');
269228af 165
7ff18dbd 166 if (-f 'MANIFEST') {
167 print "Removing MANIFEST\n";
168 unlink 'MANIFEST';
169 }
044e70c7 170
a410299d 171# require Module::Install::Pod::Inherit;
172# PodInherit();
7ff18dbd 173}
269228af 174
7ff18dbd 175auto_install();
09d46657 176
713cc98e 177WriteAll();
09d46657 178
80ff5ae0 179# Re-write META.yml to _exclude_ all forced requires (we do not want to ship this)
713cc98e 180if ($Module::Install::AUTHOR) {
713cc98e 181
80ff5ae0 182 Meta->{values}{build_requires} = [ grep
183 { not exists $force_requires_if_author{$_->[0]} }
184 ( @{Meta->{values}{build_requires}} )
185 ];
713cc98e 186
713cc98e 187 Meta->write;
09d46657 188}