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