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