update Changes
[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;
281d0f3e 29requires 'File::Slurp' => '9999.13';
8793567f 30requires 'List::MoreUtils' => 0;
31requires 'namespace::autoclean' => 0;
f170d55b 32requires 'Data::Dumper::Concise' => '1.200';
3fe9c5d9 33
ff746964 34install_script 'script/dbicdump';
35
01012543 36tests_recursive;
37
7507c8ce 38# This is my manual hack for better feature control
39# If you want to change the default answer for a feature,
40# set the appropriate environment variable, like
41# DBIC_FEATURE_MYSQL. If you want the defaults to
42# apply automatically without asking any questions,
43# set DBIC_FEATURE_NOQUESTIONS. Hopefully this will
44# save someone some pain when trying to automate
45# the installation of this software.
46
47# Maintainer shouldn't set these, as they would affect
48# the META.yml shipped to CPAN.
49
50my $_features = [
51 SQLITE => {
52 label => 'SQLite Support',
53 def => $ENV{DBIC_FEATURE_SQLITE} || 0,
54 deps => [
55 'DBI' => '1.56',
56 'DBD::SQLite' => '1.12',
57 ],
58 },
59 MYSQL => {
60 label => 'MySQL Support',
61 def => $ENV{DBIC_FEATURE_MYSQL} || 0,
62 deps => [
63 'DBI' => '1.56',
64 'DBD::mysql' => '4.004',
65 ],
66 },
67 PG => {
68 label => 'PostgreSQL Support',
69 def => $ENV{DBIC_FEATURE_PG} || 0,
70 deps => [
71 'DBI' => '1.56',
72 'DBD::Pg' => '1.49', # Soon to be 1.50
73 ],
74 },
75 DB2 => {
76 label => 'DB2 Support',
77 def => $ENV{DBIC_FEATURE_DB2} || 0,
78 deps => [
79 'DBI' => '1.56',
80 'DBD::DB2' => '1.0',
81 ],
82 },
83 ORACLE => {
84 label => 'Oracle Support (experimental)',
85 def => $ENV{DBIC_FEATURE_ORACLE} || 0,
86 deps => [
87 'DBI' => '1.56',
88 'DBD::Oracle' => '0.19',
89 ],
90 },
3ea1f8cc 91 SYBASE => {
92 label => 'Sybase Support (experimental)',
93 def => $ENV{DBIC_FEATURE_SYBASE} || 0,
94 deps => [
95 'DBI' => '1.56',
96 'DBD::Sybase' => '1.09',
97 ],
98 },
99 MSSQL => {
8793567f 100 label => 'Microsoft SQL Server Support via DBD::Sybase',
3ea1f8cc 101 def => $ENV{DBIC_FEATURE_MSSQL} || 0,
102 deps => [
103 'DBI' => '1.56',
104 'DBD::Sybase' => '1.09',
105 ],
106 },
107 MSSQL_ODBC => {
8793567f 108 label => 'Microsoft SQL Server Support via DBD::ODBC',
3ea1f8cc 109 def => $ENV{DBIC_FEATURE_MSSQL} || 0,
110 deps => [
111 'DBI' => '1.56',
112 'DBD::ODBC' => '1.22',
113 ],
114 },
7507c8ce 115];
116
117for(my $i = 0; $i <= $#$_features - 1; $i += 2) {
118 my $name = $_features->[$i];
119 my $attrs = $_features->[$i+1];
120
121 if($ENV{DBIC_FEATURE_NOQUESTIONS}) {
122 if($attrs->{def}) {
123 requires @{$attrs->{deps}};
124 }
125 }
126 else {
127 feature $attrs->{label} =>
128 -default => $attrs->{def},
129 @{$attrs->{deps}};
130 }
131}
3fe9c5d9 132
133# Rebuild README for maintainers
fdd8ff16 134if ($Module::Install::AUTHOR) {
3fe9c5d9 135 system("pod2text lib/DBIx/Class/Schema/Loader.pm > README");
136}
137
fdd8ff16 138realclean_files 'README';
139
64b844d0 140resources 'IRC' => 'irc://irc.perl.org/#dbix-class';
141resources 'license' => 'http://dev.perl.org/licenses/';
edfab8b3 142resources 'repository' => 'git://git.shadowcat.co.uk/dbsrgits/DBIx-Class-Schema-Loader.git';
64b844d0 143resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class';
144
3fe9c5d9 145auto_provides;
146auto_install;
147WriteAll;