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