Commit | Line | Data |
0662c9b3 |
1 | use inc::Module::Install 0.91; |
3fe9c5d9 |
2 | |
3 | name 'DBIx-Class-Schema-Loader'; |
4 | all_from 'lib/DBIx/Class/Schema/Loader.pm'; |
5 | |
9cb983b3 |
6 | test_requires 'Test::Exception'; |
d27f2b7b |
7 | test_requires 'Test::More' => '0.94'; |
390bbe3f |
8 | test_requires 'DBI' => '1.56'; |
9 | test_requires 'DBD::SQLite' => '1.12'; |
9cb983b3 |
10 | test_requires 'File::Copy'; |
11 | test_requires 'File::Temp' => '0.16'; |
502b65d4 |
12 | test_requires 'File::Path' => '2.07'; |
ff746964 |
13 | test_requires 'IPC::Open3' => 0; |
baff904e |
14 | test_requires 'List::MoreUtils' => 0; |
3fe9c5d9 |
15 | |
16 | requires 'File::Spec' => 0; |
17 | requires 'Scalar::Util' => 0; |
18 | requires 'Data::Dump' => '1.06'; |
3fe9c5d9 |
19 | requires 'Lingua::EN::Inflect::Number' => '1.1'; |
20 | requires 'Text::Balanced' => 0; |
21 | requires 'Digest::MD5' => '2.36'; |
c16e6d28 |
22 | requires 'Class::Accessor::Grouped' => '0.09002'; |
3fe9c5d9 |
23 | requires 'Class::C3' => '0.18'; |
ee1c392c |
24 | requires 'Class::C3::Componentised' => '1.0005'; |
3fe9c5d9 |
25 | requires 'Carp::Clan' => 0; |
26 | requires 'Class::Inspector' => 0; |
309e2aa1 |
27 | requires 'DBIx::Class' => '0.08114'; |
af31090c |
28 | requires 'Class::Unload' => 0; |
3fe9c5d9 |
29 | |
ff746964 |
30 | install_script 'script/dbicdump'; |
31 | |
01012543 |
32 | tests_recursive; |
33 | |
7507c8ce |
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. |
42 | |
43 | # Maintainer shouldn't set these, as they would affect |
44 | # the META.yml shipped to CPAN. |
45 | |
46 | my $_features = [ |
47 | SQLITE => { |
48 | label => 'SQLite Support', |
49 | def => $ENV{DBIC_FEATURE_SQLITE} || 0, |
50 | deps => [ |
51 | 'DBI' => '1.56', |
52 | 'DBD::SQLite' => '1.12', |
53 | ], |
54 | }, |
55 | MYSQL => { |
56 | label => 'MySQL Support', |
57 | def => $ENV{DBIC_FEATURE_MYSQL} || 0, |
58 | deps => [ |
59 | 'DBI' => '1.56', |
60 | 'DBD::mysql' => '4.004', |
61 | ], |
62 | }, |
63 | PG => { |
64 | label => 'PostgreSQL Support', |
65 | def => $ENV{DBIC_FEATURE_PG} || 0, |
66 | deps => [ |
67 | 'DBI' => '1.56', |
68 | 'DBD::Pg' => '1.49', # Soon to be 1.50 |
69 | ], |
70 | }, |
71 | DB2 => { |
72 | label => 'DB2 Support', |
73 | def => $ENV{DBIC_FEATURE_DB2} || 0, |
74 | deps => [ |
75 | 'DBI' => '1.56', |
76 | 'DBD::DB2' => '1.0', |
77 | ], |
78 | }, |
79 | ORACLE => { |
80 | label => 'Oracle Support (experimental)', |
81 | def => $ENV{DBIC_FEATURE_ORACLE} || 0, |
82 | deps => [ |
83 | 'DBI' => '1.56', |
84 | 'DBD::Oracle' => '0.19', |
85 | ], |
86 | }, |
3ea1f8cc |
87 | SYBASE => { |
88 | label => 'Sybase Support (experimental)', |
89 | def => $ENV{DBIC_FEATURE_SYBASE} || 0, |
90 | deps => [ |
91 | 'DBI' => '1.56', |
92 | 'DBD::Sybase' => '1.09', |
93 | ], |
94 | }, |
95 | MSSQL => { |
96 | label => 'Microsoft SQL Server Support via DBD::Sybase (experimental)', |
97 | def => $ENV{DBIC_FEATURE_MSSQL} || 0, |
98 | deps => [ |
99 | 'DBI' => '1.56', |
100 | 'DBD::Sybase' => '1.09', |
101 | ], |
102 | }, |
103 | MSSQL_ODBC => { |
104 | label => 'Microsoft SQL Server Support via DBD::ODBC (experimental)', |
105 | def => $ENV{DBIC_FEATURE_MSSQL} || 0, |
106 | deps => [ |
107 | 'DBI' => '1.56', |
108 | 'DBD::ODBC' => '1.22', |
109 | ], |
110 | }, |
7507c8ce |
111 | ]; |
112 | |
113 | for(my $i = 0; $i <= $#$_features - 1; $i += 2) { |
114 | my $name = $_features->[$i]; |
115 | my $attrs = $_features->[$i+1]; |
116 | |
117 | if($ENV{DBIC_FEATURE_NOQUESTIONS}) { |
118 | if($attrs->{def}) { |
119 | requires @{$attrs->{deps}}; |
120 | } |
121 | } |
122 | else { |
123 | feature $attrs->{label} => |
124 | -default => $attrs->{def}, |
125 | @{$attrs->{deps}}; |
126 | } |
127 | } |
3fe9c5d9 |
128 | |
129 | # Rebuild README for maintainers |
fdd8ff16 |
130 | if ($Module::Install::AUTHOR) { |
3fe9c5d9 |
131 | system("pod2text lib/DBIx/Class/Schema/Loader.pm > README"); |
132 | } |
133 | |
fdd8ff16 |
134 | realclean_files 'README'; |
135 | |
64b844d0 |
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'; |
140 | |
3fe9c5d9 |
141 | auto_provides; |
142 | auto_install; |
143 | WriteAll; |