Documentation change: do not overwrite unchanged schema modules
[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
7test_requires 'Test::More' => '0.47';
8test_requires 'DBI' => '1.56';
9test_requires 'DBD::SQLite' => '1.12';
10test_requires 'File::Path' => 0;
11
12requires 'File::Spec' => 0;
13requires 'Scalar::Util' => 0;
14requires 'Data::Dump' => '1.06';
15requires 'UNIVERSAL::require' => '0.11';
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';
22requires 'Carp::Clan' => 0;
23requires 'Class::Inspector' => 0;
24requires 'DBIx::Class' => '0.07006';
25
7507c8ce 26# This is my manual hack for better feature control
27# If you want to change the default answer for a feature,
28# set the appropriate environment variable, like
29# DBIC_FEATURE_MYSQL. If you want the defaults to
30# apply automatically without asking any questions,
31# set DBIC_FEATURE_NOQUESTIONS. Hopefully this will
32# save someone some pain when trying to automate
33# the installation of this software.
34
35# Maintainer shouldn't set these, as they would affect
36# the META.yml shipped to CPAN.
37
38my $_features = [
39 SQLITE => {
40 label => 'SQLite Support',
41 def => $ENV{DBIC_FEATURE_SQLITE} || 0,
42 deps => [
43 'DBI' => '1.56',
44 'DBD::SQLite' => '1.12',
45 ],
46 },
47 MYSQL => {
48 label => 'MySQL Support',
49 def => $ENV{DBIC_FEATURE_MYSQL} || 0,
50 deps => [
51 'DBI' => '1.56',
52 'DBD::mysql' => '4.004',
53 ],
54 },
55 PG => {
56 label => 'PostgreSQL Support',
57 def => $ENV{DBIC_FEATURE_PG} || 0,
58 deps => [
59 'DBI' => '1.56',
60 'DBD::Pg' => '1.49', # Soon to be 1.50
61 ],
62 },
63 DB2 => {
64 label => 'DB2 Support',
65 def => $ENV{DBIC_FEATURE_DB2} || 0,
66 deps => [
67 'DBI' => '1.56',
68 'DBD::DB2' => '1.0',
69 ],
70 },
71 ORACLE => {
72 label => 'Oracle Support (experimental)',
73 def => $ENV{DBIC_FEATURE_ORACLE} || 0,
74 deps => [
75 'DBI' => '1.56',
76 'DBD::Oracle' => '0.19',
77 ],
78 },
79];
80
81for(my $i = 0; $i <= $#$_features - 1; $i += 2) {
82 my $name = $_features->[$i];
83 my $attrs = $_features->[$i+1];
84
85 if($ENV{DBIC_FEATURE_NOQUESTIONS}) {
86 if($attrs->{def}) {
87 requires @{$attrs->{deps}};
88 }
89 }
90 else {
91 feature $attrs->{label} =>
92 -default => $attrs->{def},
93 @{$attrs->{deps}};
94 }
95}
3fe9c5d9 96
97# Rebuild README for maintainers
98if(-e 'MANIFEST.SKIP') {
99 system("pod2text lib/DBIx/Class/Schema/Loader.pm > README");
100}
101
102auto_provides;
103auto_install;
104WriteAll;