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; |
11 | test_requires 'Class::Unload' => 0; |
3fe9c5d9 |
12 | |
13 | requires 'File::Spec' => 0; |
14 | requires 'Scalar::Util' => 0; |
15 | requires 'Data::Dump' => '1.06'; |
16 | requires 'UNIVERSAL::require' => '0.11'; |
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'; |
23 | requires 'Carp::Clan' => 0; |
24 | requires 'Class::Inspector' => 0; |
25 | requires 'DBIx::Class' => '0.07006'; |
26 | |
7507c8ce |
27 | # This is my manual hack for better feature control |
28 | # If you want to change the default answer for a feature, |
29 | # set the appropriate environment variable, like |
30 | # DBIC_FEATURE_MYSQL. If you want the defaults to |
31 | # apply automatically without asking any questions, |
32 | # set DBIC_FEATURE_NOQUESTIONS. Hopefully this will |
33 | # save someone some pain when trying to automate |
34 | # the installation of this software. |
35 | |
36 | # Maintainer shouldn't set these, as they would affect |
37 | # the META.yml shipped to CPAN. |
38 | |
39 | my $_features = [ |
40 | SQLITE => { |
41 | label => 'SQLite Support', |
42 | def => $ENV{DBIC_FEATURE_SQLITE} || 0, |
43 | deps => [ |
44 | 'DBI' => '1.56', |
45 | 'DBD::SQLite' => '1.12', |
46 | ], |
47 | }, |
48 | MYSQL => { |
49 | label => 'MySQL Support', |
50 | def => $ENV{DBIC_FEATURE_MYSQL} || 0, |
51 | deps => [ |
52 | 'DBI' => '1.56', |
53 | 'DBD::mysql' => '4.004', |
54 | ], |
55 | }, |
56 | PG => { |
57 | label => 'PostgreSQL Support', |
58 | def => $ENV{DBIC_FEATURE_PG} || 0, |
59 | deps => [ |
60 | 'DBI' => '1.56', |
61 | 'DBD::Pg' => '1.49', # Soon to be 1.50 |
62 | ], |
63 | }, |
64 | DB2 => { |
65 | label => 'DB2 Support', |
66 | def => $ENV{DBIC_FEATURE_DB2} || 0, |
67 | deps => [ |
68 | 'DBI' => '1.56', |
69 | 'DBD::DB2' => '1.0', |
70 | ], |
71 | }, |
72 | ORACLE => { |
73 | label => 'Oracle Support (experimental)', |
74 | def => $ENV{DBIC_FEATURE_ORACLE} || 0, |
75 | deps => [ |
76 | 'DBI' => '1.56', |
77 | 'DBD::Oracle' => '0.19', |
78 | ], |
79 | }, |
80 | ]; |
81 | |
82 | for(my $i = 0; $i <= $#$_features - 1; $i += 2) { |
83 | my $name = $_features->[$i]; |
84 | my $attrs = $_features->[$i+1]; |
85 | |
86 | if($ENV{DBIC_FEATURE_NOQUESTIONS}) { |
87 | if($attrs->{def}) { |
88 | requires @{$attrs->{deps}}; |
89 | } |
90 | } |
91 | else { |
92 | feature $attrs->{label} => |
93 | -default => $attrs->{def}, |
94 | @{$attrs->{deps}}; |
95 | } |
96 | } |
3fe9c5d9 |
97 | |
98 | # Rebuild README for maintainers |
99 | if(-e 'MANIFEST.SKIP') { |
100 | system("pod2text lib/DBIx/Class/Schema/Loader.pm > README"); |
101 | } |
102 | |
103 | auto_provides; |
104 | auto_install; |
105 | WriteAll; |