moved code to ::DBI::MSSQL and added DT inflation test
[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
13test_requires 'Test::Builder' => 0.33;
14test_requires 'Test::Deep' => 0;
15test_requires 'Test::Exception' => 0;
16test_requires 'Test::More' => 0.82;
17test_requires 'Test::Warn' => 0.11;
ce4c07df 18
2f8a12ff 19# Core
20requires 'List::Util' => 0;
21requires 'Scalar::Util' => 0;
22requires 'Storable' => 0;
23
ce4c07df 24# Perl 5.8.0 doesn't have utf8::is_utf8()
2f8a12ff 25requires 'Encode' => 0 if ($] <= 5.008000);
ce4c07df 26
3a4251e2 27# Dependencies (keep in alphabetical order)
28requires 'Carp::Clan' => 6.0;
29requires 'Class::Accessor::Grouped' => 0.08003;
30requires 'Class::C3::Componentised' => 1.0005;
31requires 'Class::Inspector' => 1.24;
32requires 'Data::Page' => 2.00;
33requires 'DBD::SQLite' => 1.25;
34requires 'DBI' => 1.605;
35requires 'JSON::Any' => 1.18;
36requires 'MRO::Compat' => 0.09;
37requires 'Module::Find' => 0.06;
38requires 'Path::Class' => 0.16;
39requires 'Scope::Guard' => 0.03;
40requires 'SQL::Abstract' => 1.56;
41requires 'SQL::Abstract::Limit' => 0.13;
42requires 'Sub::Name' => 0.04;
ce4c07df 43
82fae370 44recommends 'SQL::Translator' => 0.09004;
45
0ee285f3 46install_script (qw|
47 script/dbicadmin
48|);
ce4c07df 49
0ee285f3 50tests_recursive (qw|
51 t
52|);
ce4c07df 53
20ff58f2 54resources 'IRC' => 'irc://irc.perl.org/#dbix-class';
55resources 'license' => 'http://dev.perl.org/licenses/';
56resources 'repository' => 'http://dev.catalyst.perl.org/svnweb/bast/browse/DBIx-Class/';
57resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class';
58
59
c96454c3 60# re-build README and require extra modules for testing if we're in a checkout
fe650234 61
82fae370 62my %force_requires_if_author = (
c96454c3 63 'Test::Pod::Coverage' => 1.04,
044e70c7 64 'Module::Install::Pod::Inherit' => 0.01,
eb0bc670 65 'SQL::Translator' => 0.09007,
9ac2c0f8 66
67 # CDBI-compat related
82fae370 68 'DBIx::ContextualFetch' => 0,
602fd807 69 'Class::DBI::Plugin::DeepAbstractSearch' => 0,
82fae370 70 'Class::Trigger' => 0,
97d61088 71 'Time::Piece::MySQL' => 0,
82fae370 72 'Clone' => 0,
971bc4b6 73 'Date::Simple' => 3.03,
9ac2c0f8 74
75 # t/52cycle.t
82fae370 76 'Test::Memory::Cycle' => 0,
e43797df 77 'Devel::Cycle' => 1.10,
9ac2c0f8 78
40f75181 79 # t/36datetime.t
c96454c3 80 # t/60core.t
40f75181 81 'DateTime::Format::SQLite' => 0,
5fc1107f 82
40f75181 83 # t/96_is_deteministic_value.t
3a4251e2 84 'DateTime::Format::Strptime'=> 0,
40f75181 85
3a4251e2 86 # t/93storage_replication.t
450a317d 87 'Moose', => 0.87,
88 'MooseX::AttributeHelpers' => 0.21,
89 'MooseX::Types', => 0.16,
3a4251e2 90 'namespace::clean' => 0.11,
91 'Hash::Merge', => 0.11,
92
93 # database-dependent reqs
94 #
9d2b098e 95 $ENV{DBICTEST_PG_DSN}
3a4251e2 96 ? (
97 'Sys::SigAction' => 0,
ac45262b 98 'DBD::Pg' => 2.009002,
3a4251e2 99 'DateTime::Format::Pg' => 0,
100 ) : ()
9d2b098e 101 ,
102
3a4251e2 103 $ENV{DBICTEST_MYSQL_DSN}
104 ? (
105 'DateTime::Format::MySQL' => 0,
106 ) : ()
107 ,
c96454c3 108
3a4251e2 109 $ENV{DBICTEST_ORACLE_DSN}
110 ? (
111 'DateTime::Format::Oracle' => 0,
112 ) : ()
113 ,
fe650234 114);
115
116if ($Module::Install::AUTHOR) {
d7fda552 117 warn <<'EOW';
118******************************************************************************
119******************************************************************************
120*** ***
121*** AUTHOR MODE: all optional test dependencies converted to hard requires ***
122*** ***
123******************************************************************************
124******************************************************************************
125
126EOW
80ff5ae0 127
3a4251e2 128 foreach my $module (sort keys %force_requires_if_author) {
80ff5ae0 129 build_requires ($module => $force_requires_if_author{$module});
130 }
131
7ff18dbd 132 print "Regenerating README\n";
80ff5ae0 133 system('pod2text lib/DBIx/Class.pm > README');
3e110410 134
7ff18dbd 135 if (-f 'MANIFEST') {
136 print "Removing MANIFEST\n";
137 unlink 'MANIFEST';
138 }
044e70c7 139
140 eval { require Module::Install::Pod::Inherit };
f27af22a 141 PodInherit() if !$@;
7ff18dbd 142}
80ff5ae0 143
7ff18dbd 144auto_install();
269228af 145
713cc98e 146WriteAll();
269228af 147
80ff5ae0 148# Re-write META.yml to _exclude_ all forced requires (we do not want to ship this)
713cc98e 149if ($Module::Install::AUTHOR) {
80ff5ae0 150
151 Meta->{values}{build_requires} = [ grep
152 { not exists $force_requires_if_author{$_->[0]} }
153 ( @{Meta->{values}{build_requires}} )
154 ];
155
713cc98e 156 Meta->write;
157}