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