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; |
281d0f3e |
29 | requires 'File::Slurp' => '9999.13'; |
8793567f |
30 | requires 'List::MoreUtils' => 0; |
31 | requires 'namespace::autoclean' => 0; |
3fe9c5d9 |
32 | |
ff746964 |
33 | install_script 'script/dbicdump'; |
34 | |
01012543 |
35 | tests_recursive; |
36 | |
7507c8ce |
37 | # This is my manual hack for better feature control |
38 | # If you want to change the default answer for a feature, |
39 | # set the appropriate environment variable, like |
40 | # DBIC_FEATURE_MYSQL. If you want the defaults to |
41 | # apply automatically without asking any questions, |
42 | # set DBIC_FEATURE_NOQUESTIONS. Hopefully this will |
43 | # save someone some pain when trying to automate |
44 | # the installation of this software. |
45 | |
46 | # Maintainer shouldn't set these, as they would affect |
47 | # the META.yml shipped to CPAN. |
48 | |
49 | my $_features = [ |
50 | SQLITE => { |
51 | label => 'SQLite Support', |
52 | def => $ENV{DBIC_FEATURE_SQLITE} || 0, |
53 | deps => [ |
54 | 'DBI' => '1.56', |
55 | 'DBD::SQLite' => '1.12', |
56 | ], |
57 | }, |
58 | MYSQL => { |
59 | label => 'MySQL Support', |
60 | def => $ENV{DBIC_FEATURE_MYSQL} || 0, |
61 | deps => [ |
62 | 'DBI' => '1.56', |
63 | 'DBD::mysql' => '4.004', |
64 | ], |
65 | }, |
66 | PG => { |
67 | label => 'PostgreSQL Support', |
68 | def => $ENV{DBIC_FEATURE_PG} || 0, |
69 | deps => [ |
70 | 'DBI' => '1.56', |
71 | 'DBD::Pg' => '1.49', # Soon to be 1.50 |
72 | ], |
73 | }, |
74 | DB2 => { |
75 | label => 'DB2 Support', |
76 | def => $ENV{DBIC_FEATURE_DB2} || 0, |
77 | deps => [ |
78 | 'DBI' => '1.56', |
79 | 'DBD::DB2' => '1.0', |
80 | ], |
81 | }, |
82 | ORACLE => { |
83 | label => 'Oracle Support (experimental)', |
84 | def => $ENV{DBIC_FEATURE_ORACLE} || 0, |
85 | deps => [ |
86 | 'DBI' => '1.56', |
87 | 'DBD::Oracle' => '0.19', |
88 | ], |
89 | }, |
3ea1f8cc |
90 | SYBASE => { |
91 | label => 'Sybase Support (experimental)', |
92 | def => $ENV{DBIC_FEATURE_SYBASE} || 0, |
93 | deps => [ |
94 | 'DBI' => '1.56', |
95 | 'DBD::Sybase' => '1.09', |
96 | ], |
97 | }, |
98 | MSSQL => { |
8793567f |
99 | label => 'Microsoft SQL Server Support via DBD::Sybase', |
3ea1f8cc |
100 | def => $ENV{DBIC_FEATURE_MSSQL} || 0, |
101 | deps => [ |
102 | 'DBI' => '1.56', |
103 | 'DBD::Sybase' => '1.09', |
104 | ], |
105 | }, |
106 | MSSQL_ODBC => { |
8793567f |
107 | label => 'Microsoft SQL Server Support via DBD::ODBC', |
3ea1f8cc |
108 | def => $ENV{DBIC_FEATURE_MSSQL} || 0, |
109 | deps => [ |
110 | 'DBI' => '1.56', |
111 | 'DBD::ODBC' => '1.22', |
112 | ], |
113 | }, |
7507c8ce |
114 | ]; |
115 | |
116 | for(my $i = 0; $i <= $#$_features - 1; $i += 2) { |
117 | my $name = $_features->[$i]; |
118 | my $attrs = $_features->[$i+1]; |
119 | |
120 | if($ENV{DBIC_FEATURE_NOQUESTIONS}) { |
121 | if($attrs->{def}) { |
122 | requires @{$attrs->{deps}}; |
123 | } |
124 | } |
125 | else { |
126 | feature $attrs->{label} => |
127 | -default => $attrs->{def}, |
128 | @{$attrs->{deps}}; |
129 | } |
130 | } |
3fe9c5d9 |
131 | |
132 | # Rebuild README for maintainers |
fdd8ff16 |
133 | if ($Module::Install::AUTHOR) { |
3fe9c5d9 |
134 | system("pod2text lib/DBIx/Class/Schema/Loader.pm > README"); |
135 | } |
136 | |
fdd8ff16 |
137 | realclean_files 'README'; |
138 | |
64b844d0 |
139 | resources 'IRC' => 'irc://irc.perl.org/#dbix-class'; |
140 | resources 'license' => 'http://dev.perl.org/licenses/'; |
edfab8b3 |
141 | resources 'repository' => 'git://git.shadowcat.co.uk/dbsrgits/DBIx-Class-Schema-Loader.git'; |
64b844d0 |
142 | resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class'; |
143 | |
3fe9c5d9 |
144 | auto_provides; |
145 | auto_install; |
146 | WriteAll; |