1 use inc::Module::Install 0.91;
3 name 'DBIx-Class-Schema-Loader';
4 all_from 'lib/DBIx/Class/Schema/Loader.pm';
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 test_requires 'List::MoreUtils' => 0;
16 requires 'File::Spec' => 0;
17 requires 'Scalar::Util' => 0;
18 requires 'Data::Dump' => '1.06';
19 requires 'Lingua::EN::Inflect::Number' => '1.1';
20 requires 'Text::Balanced' => 0;
21 requires 'Digest::MD5' => '2.36';
22 requires 'Class::Accessor::Grouped' => '0.09002';
23 requires 'Class::C3' => '0.18';
24 requires 'Class::C3::Componentised' => '1.0005';
25 requires 'Carp::Clan' => 0;
26 requires 'Class::Inspector' => 0;
27 requires 'DBIx::Class' => '0.08114';
28 requires 'Class::Unload' => 0;
30 install_script 'script/dbicdump';
34 # This is my manual hack for better feature control
35 # If you want to change the default answer for a feature,
36 # set the appropriate environment variable, like
37 # DBIC_FEATURE_MYSQL. If you want the defaults to
38 # apply automatically without asking any questions,
39 # set DBIC_FEATURE_NOQUESTIONS. Hopefully this will
40 # save someone some pain when trying to automate
41 # the installation of this software.
43 # Maintainer shouldn't set these, as they would affect
44 # the META.yml shipped to CPAN.
48 label => 'SQLite Support',
49 def => $ENV{DBIC_FEATURE_SQLITE} || 0,
52 'DBD::SQLite' => '1.12',
56 label => 'MySQL Support',
57 def => $ENV{DBIC_FEATURE_MYSQL} || 0,
60 'DBD::mysql' => '4.004',
64 label => 'PostgreSQL Support',
65 def => $ENV{DBIC_FEATURE_PG} || 0,
68 'DBD::Pg' => '1.49', # Soon to be 1.50
72 label => 'DB2 Support',
73 def => $ENV{DBIC_FEATURE_DB2} || 0,
80 label => 'Oracle Support (experimental)',
81 def => $ENV{DBIC_FEATURE_ORACLE} || 0,
84 'DBD::Oracle' => '0.19',
88 label => 'Sybase Support (experimental)',
89 def => $ENV{DBIC_FEATURE_SYBASE} || 0,
92 'DBD::Sybase' => '1.09',
96 label => 'Microsoft SQL Server Support via DBD::Sybase (experimental)',
97 def => $ENV{DBIC_FEATURE_MSSQL} || 0,
100 'DBD::Sybase' => '1.09',
104 label => 'Microsoft SQL Server Support via DBD::ODBC (experimental)',
105 def => $ENV{DBIC_FEATURE_MSSQL} || 0,
108 'DBD::ODBC' => '1.22',
113 for(my $i = 0; $i <= $#$_features - 1; $i += 2) {
114 my $name = $_features->[$i];
115 my $attrs = $_features->[$i+1];
117 if($ENV{DBIC_FEATURE_NOQUESTIONS}) {
119 requires @{$attrs->{deps}};
123 feature $attrs->{label} =>
124 -default => $attrs->{def},
129 # Rebuild README for maintainers
130 if ($Module::Install::AUTHOR) {
131 system("pod2text lib/DBIx/Class/Schema/Loader.pm > README");
134 realclean_files 'README';
136 resources 'IRC' => 'irc://irc.perl.org/#dbix-class';
137 resources 'license' => 'http://dev.perl.org/licenses/';
138 resources 'repository' => 'http://dev.catalyst.perl.org/repos/bast/branches/DBIx-Class-Schema-Loader/current/';
139 resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class';