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