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