Commit | Line | Data |
3fe9c5d9 |
1 | |
be2fd10c |
2 | use inc::Module::Install 0.71; |
3fe9c5d9 |
3 | |
4 | name 'DBIx-Class-Schema-Loader'; |
5 | all_from 'lib/DBIx/Class/Schema/Loader.pm'; |
6 | |
390bbe3f |
7 | test_requires 'Test::More' => '0.47'; |
8 | test_requires 'DBI' => '1.56'; |
9 | test_requires 'DBD::SQLite' => '1.12'; |
10 | test_requires 'File::Path' => 0; |
ff746964 |
11 | test_requires 'IPC::Open3' => 0; |
f430297e |
12 | test_requires 'Test::Exception'; |
3fe9c5d9 |
13 | |
14 | requires 'File::Spec' => 0; |
15 | requires 'Scalar::Util' => 0; |
16 | requires 'Data::Dump' => '1.06'; |
3fe9c5d9 |
17 | requires 'Lingua::EN::Inflect::Number' => '1.1'; |
18 | requires 'Text::Balanced' => 0; |
19 | requires 'Digest::MD5' => '2.36'; |
20 | requires 'Class::Accessor::Fast' => '0.30'; |
21 | requires 'Class::Data::Accessor' => '0.03'; |
22 | requires 'Class::C3' => '0.18'; |
ee1c392c |
23 | requires 'Class::C3::Componentised' => '1.0005'; |
3fe9c5d9 |
24 | requires 'Carp::Clan' => 0; |
25 | requires 'Class::Inspector' => 0; |
b1e43108 |
26 | requires 'DBIx::Class' => '0.08109'; |
af31090c |
27 | requires 'Class::Unload' => 0; |
3fe9c5d9 |
28 | |
ff746964 |
29 | install_script 'script/dbicdump'; |
30 | |
7507c8ce |
31 | # This is my manual hack for better feature control |
32 | # If you want to change the default answer for a feature, |
33 | # set the appropriate environment variable, like |
34 | # DBIC_FEATURE_MYSQL. If you want the defaults to |
35 | # apply automatically without asking any questions, |
36 | # set DBIC_FEATURE_NOQUESTIONS. Hopefully this will |
37 | # save someone some pain when trying to automate |
38 | # the installation of this software. |
39 | |
40 | # Maintainer shouldn't set these, as they would affect |
41 | # the META.yml shipped to CPAN. |
42 | |
43 | my $_features = [ |
44 | SQLITE => { |
45 | label => 'SQLite Support', |
46 | def => $ENV{DBIC_FEATURE_SQLITE} || 0, |
47 | deps => [ |
48 | 'DBI' => '1.56', |
49 | 'DBD::SQLite' => '1.12', |
50 | ], |
51 | }, |
52 | MYSQL => { |
53 | label => 'MySQL Support', |
54 | def => $ENV{DBIC_FEATURE_MYSQL} || 0, |
55 | deps => [ |
56 | 'DBI' => '1.56', |
57 | 'DBD::mysql' => '4.004', |
58 | ], |
59 | }, |
60 | PG => { |
61 | label => 'PostgreSQL Support', |
62 | def => $ENV{DBIC_FEATURE_PG} || 0, |
63 | deps => [ |
64 | 'DBI' => '1.56', |
65 | 'DBD::Pg' => '1.49', # Soon to be 1.50 |
66 | ], |
67 | }, |
68 | DB2 => { |
69 | label => 'DB2 Support', |
70 | def => $ENV{DBIC_FEATURE_DB2} || 0, |
71 | deps => [ |
72 | 'DBI' => '1.56', |
73 | 'DBD::DB2' => '1.0', |
74 | ], |
75 | }, |
76 | ORACLE => { |
77 | label => 'Oracle Support (experimental)', |
78 | def => $ENV{DBIC_FEATURE_ORACLE} || 0, |
79 | deps => [ |
80 | 'DBI' => '1.56', |
81 | 'DBD::Oracle' => '0.19', |
82 | ], |
83 | }, |
3ea1f8cc |
84 | SYBASE => { |
85 | label => 'Sybase Support (experimental)', |
86 | def => $ENV{DBIC_FEATURE_SYBASE} || 0, |
87 | deps => [ |
88 | 'DBI' => '1.56', |
89 | 'DBD::Sybase' => '1.09', |
90 | ], |
91 | }, |
92 | MSSQL => { |
93 | label => 'Microsoft SQL Server Support via DBD::Sybase (experimental)', |
94 | def => $ENV{DBIC_FEATURE_MSSQL} || 0, |
95 | deps => [ |
96 | 'DBI' => '1.56', |
97 | 'DBD::Sybase' => '1.09', |
98 | ], |
99 | }, |
100 | MSSQL_ODBC => { |
101 | label => 'Microsoft SQL Server Support via DBD::ODBC (experimental)', |
102 | def => $ENV{DBIC_FEATURE_MSSQL} || 0, |
103 | deps => [ |
104 | 'DBI' => '1.56', |
105 | 'DBD::ODBC' => '1.22', |
106 | ], |
107 | }, |
7507c8ce |
108 | ]; |
109 | |
110 | for(my $i = 0; $i <= $#$_features - 1; $i += 2) { |
111 | my $name = $_features->[$i]; |
112 | my $attrs = $_features->[$i+1]; |
113 | |
114 | if($ENV{DBIC_FEATURE_NOQUESTIONS}) { |
115 | if($attrs->{def}) { |
116 | requires @{$attrs->{deps}}; |
117 | } |
118 | } |
119 | else { |
120 | feature $attrs->{label} => |
121 | -default => $attrs->{def}, |
122 | @{$attrs->{deps}}; |
123 | } |
124 | } |
3fe9c5d9 |
125 | |
126 | # Rebuild README for maintainers |
127 | if(-e 'MANIFEST.SKIP') { |
128 | system("pod2text lib/DBIx/Class/Schema/Loader.pm > README"); |
129 | } |
130 | |
131 | auto_provides; |
132 | auto_install; |
133 | WriteAll; |