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