Merge 'current' into 'mssql_tweaks'
[dbsrgits/DBIx-Class-Schema-Loader.git] / Makefile.PL
CommitLineData
3fe9c5d9 1
be2fd10c 2use inc::Module::Install 0.71;
3fe9c5d9 3
4name 'DBIx-Class-Schema-Loader';
5all_from 'lib/DBIx/Class/Schema/Loader.pm';
6
390bbe3f 7test_requires 'Test::More' => '0.47';
8test_requires 'DBI' => '1.56';
9test_requires 'DBD::SQLite' => '1.12';
10test_requires 'File::Path' => 0;
ff746964 11test_requires 'IPC::Open3' => 0;
f430297e 12test_requires 'Test::Exception';
3fe9c5d9 13
14requires 'File::Spec' => 0;
15requires 'Scalar::Util' => 0;
16requires 'Data::Dump' => '1.06';
3fe9c5d9 17requires 'Lingua::EN::Inflect::Number' => '1.1';
18requires 'Text::Balanced' => 0;
19requires 'Digest::MD5' => '2.36';
20requires 'Class::Accessor::Fast' => '0.30';
21requires 'Class::Data::Accessor' => '0.03';
22requires 'Class::C3' => '0.18';
ee1c392c 23requires 'Class::C3::Componentised' => '1.0005';
3fe9c5d9 24requires 'Carp::Clan' => 0;
25requires 'Class::Inspector' => 0;
b1e43108 26requires 'DBIx::Class' => '0.08109';
af31090c 27requires 'Class::Unload' => 0;
3fe9c5d9 28
ff746964 29install_script 'script/dbicdump';
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 },
84];
85
86for(my $i = 0; $i <= $#$_features - 1; $i += 2) {
87 my $name = $_features->[$i];
88 my $attrs = $_features->[$i+1];
89
90 if($ENV{DBIC_FEATURE_NOQUESTIONS}) {
91 if($attrs->{def}) {
92 requires @{$attrs->{deps}};
93 }
94 }
95 else {
96 feature $attrs->{label} =>
97 -default => $attrs->{def},
98 @{$attrs->{deps}};
99 }
100}
3fe9c5d9 101
102# Rebuild README for maintainers
103if(-e 'MANIFEST.SKIP') {
104 system("pod2text lib/DBIx/Class/Schema/Loader.pm > README");
105}
106
107auto_provides;
108auto_install;
109WriteAll;