fix regular common tests
[dbsrgits/DBIx-Class-Schema-Loader.git] / Makefile.PL
CommitLineData
0662c9b3 1use inc::Module::Install 0.91;
3fe9c5d9 2
3name 'DBIx-Class-Schema-Loader';
4all_from 'lib/DBIx/Class/Schema/Loader.pm';
5
390bbe3f 6test_requires 'Test::More' => '0.47';
7test_requires 'DBI' => '1.56';
8test_requires 'DBD::SQLite' => '1.12';
9test_requires 'File::Path' => 0;
ff746964 10test_requires 'IPC::Open3' => 0;
f430297e 11test_requires 'Test::Exception';
3fe9c5d9 12
13requires 'File::Spec' => 0;
14requires 'Scalar::Util' => 0;
15requires 'Data::Dump' => '1.06';
3fe9c5d9 16requires 'Lingua::EN::Inflect::Number' => '1.1';
17requires 'Text::Balanced' => 0;
18requires 'Digest::MD5' => '2.36';
19requires 'Class::Accessor::Fast' => '0.30';
20requires 'Class::Data::Accessor' => '0.03';
21requires 'Class::C3' => '0.18';
ee1c392c 22requires 'Class::C3::Componentised' => '1.0005';
3fe9c5d9 23requires 'Carp::Clan' => 0;
24requires 'Class::Inspector' => 0;
b1e43108 25requires 'DBIx::Class' => '0.08109';
af31090c 26requires 'Class::Unload' => 0;
3fe9c5d9 27
ff746964 28install_script 'script/dbicdump';
29
01012543 30tests_recursive;
31
7507c8ce 32# This is my manual hack for better feature control
33# If you want to change the default answer for a feature,
34# set the appropriate environment variable, like
35# DBIC_FEATURE_MYSQL. If you want the defaults to
36# apply automatically without asking any questions,
37# set DBIC_FEATURE_NOQUESTIONS. Hopefully this will
38# save someone some pain when trying to automate
39# the installation of this software.
40
41# Maintainer shouldn't set these, as they would affect
42# the META.yml shipped to CPAN.
43
44my $_features = [
45 SQLITE => {
46 label => 'SQLite Support',
47 def => $ENV{DBIC_FEATURE_SQLITE} || 0,
48 deps => [
49 'DBI' => '1.56',
50 'DBD::SQLite' => '1.12',
51 ],
52 },
53 MYSQL => {
54 label => 'MySQL Support',
55 def => $ENV{DBIC_FEATURE_MYSQL} || 0,
56 deps => [
57 'DBI' => '1.56',
58 'DBD::mysql' => '4.004',
59 ],
60 },
61 PG => {
62 label => 'PostgreSQL Support',
63 def => $ENV{DBIC_FEATURE_PG} || 0,
64 deps => [
65 'DBI' => '1.56',
66 'DBD::Pg' => '1.49', # Soon to be 1.50
67 ],
68 },
69 DB2 => {
70 label => 'DB2 Support',
71 def => $ENV{DBIC_FEATURE_DB2} || 0,
72 deps => [
73 'DBI' => '1.56',
74 'DBD::DB2' => '1.0',
75 ],
76 },
77 ORACLE => {
78 label => 'Oracle Support (experimental)',
79 def => $ENV{DBIC_FEATURE_ORACLE} || 0,
80 deps => [
81 'DBI' => '1.56',
82 'DBD::Oracle' => '0.19',
83 ],
84 },
3ea1f8cc 85 SYBASE => {
86 label => 'Sybase Support (experimental)',
87 def => $ENV{DBIC_FEATURE_SYBASE} || 0,
88 deps => [
89 'DBI' => '1.56',
90 'DBD::Sybase' => '1.09',
91 ],
92 },
93 MSSQL => {
94 label => 'Microsoft SQL Server Support via DBD::Sybase (experimental)',
95 def => $ENV{DBIC_FEATURE_MSSQL} || 0,
96 deps => [
97 'DBI' => '1.56',
98 'DBD::Sybase' => '1.09',
99 ],
100 },
101 MSSQL_ODBC => {
102 label => 'Microsoft SQL Server Support via DBD::ODBC (experimental)',
103 def => $ENV{DBIC_FEATURE_MSSQL} || 0,
104 deps => [
105 'DBI' => '1.56',
106 'DBD::ODBC' => '1.22',
107 ],
108 },
7507c8ce 109];
110
111for(my $i = 0; $i <= $#$_features - 1; $i += 2) {
112 my $name = $_features->[$i];
113 my $attrs = $_features->[$i+1];
114
115 if($ENV{DBIC_FEATURE_NOQUESTIONS}) {
116 if($attrs->{def}) {
117 requires @{$attrs->{deps}};
118 }
119 }
120 else {
121 feature $attrs->{label} =>
122 -default => $attrs->{def},
123 @{$attrs->{deps}};
124 }
125}
3fe9c5d9 126
127# Rebuild README for maintainers
128if(-e 'MANIFEST.SKIP') {
129 system("pod2text lib/DBIx/Class/Schema/Loader.pm > README");
130}
131
64b844d0 132resources 'IRC' => 'irc://irc.perl.org/#dbix-class';
133resources 'license' => 'http://dev.perl.org/licenses/';
134resources 'repository' => 'http://dev.catalyst.perl.org/repos/bast/branches/DBIx-Class-Schema-Loader/current/';
135resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class';
136
3fe9c5d9 137auto_provides;
138auto_install;
139WriteAll;