fix MySQL rel introspection with on_connect_call => "set_strict_mode" (RT#52087)
[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
390bbe3f 6test_requires 'Test::More' => '0.47';
7test_requires 'DBI' => '1.56';
8test_requires 'DBD::SQLite' => '1.12';
9test_requires 'File::Path' => 0;
ff746964 10test_requires 'IPC::Open3' => 0;
f430297e 11test_requires 'Test::Exception';
3fe9c5d9 12
13requires 'File::Spec' => 0;
14requires 'Scalar::Util' => 0;
15requires 'Data::Dump' => '1.06';
3fe9c5d9 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';
ee1c392c 22requires 'Class::C3::Componentised' => '1.0005';
3fe9c5d9 23requires 'Carp::Clan' => 0;
24requires 'Class::Inspector' => 0;
309e2aa1 25requires 'DBIx::Class' => '0.08114';
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 },
3ea1f8cc 83 SYBASE => {
84 label => 'Sybase Support (experimental)',
85 def => $ENV{DBIC_FEATURE_SYBASE} || 0,
86 deps => [
87 'DBI' => '1.56',
88 'DBD::Sybase' => '1.09',
89 ],
90 },
91 MSSQL => {
92 label => 'Microsoft SQL Server Support via DBD::Sybase (experimental)',
93 def => $ENV{DBIC_FEATURE_MSSQL} || 0,
94 deps => [
95 'DBI' => '1.56',
96 'DBD::Sybase' => '1.09',
97 ],
98 },
99 MSSQL_ODBC => {
100 label => 'Microsoft SQL Server Support via DBD::ODBC (experimental)',
101 def => $ENV{DBIC_FEATURE_MSSQL} || 0,
102 deps => [
103 'DBI' => '1.56',
104 'DBD::ODBC' => '1.22',
105 ],
106 },
7507c8ce 107];
108
109for(my $i = 0; $i <= $#$_features - 1; $i += 2) {
110 my $name = $_features->[$i];
111 my $attrs = $_features->[$i+1];
112
113 if($ENV{DBIC_FEATURE_NOQUESTIONS}) {
114 if($attrs->{def}) {
115 requires @{$attrs->{deps}};
116 }
117 }
118 else {
119 feature $attrs->{label} =>
120 -default => $attrs->{def},
121 @{$attrs->{deps}};
122 }
123}
3fe9c5d9 124
125# Rebuild README for maintainers
fdd8ff16 126if ($Module::Install::AUTHOR) {
3fe9c5d9 127 system("pod2text lib/DBIx/Class/Schema/Loader.pm > README");
128}
129
fdd8ff16 130realclean_files 'README';
131
64b844d0 132resources 'IRC' => 'irc://irc.perl.org/#dbix-class';
133resources 'license' => 'http://dev.perl.org/licenses/';
134resources 'repository' => 'http://dev.catalyst.perl.org/repos/bast/branches/DBIx-Class-Schema-Loader/current/';
135resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class';
136
3fe9c5d9 137auto_provides;
138auto_install;
139WriteAll;