Commit | Line | Data |
89b5b1c5 |
1 | use inc::Module::Install 0.89; |
fe650234 |
2 | use strict; |
3 | use warnings; |
76607ac8 |
4 | use POSIX (); |
fe650234 |
5 | |
6 | use 5.006001; # delete this line if you want to send patches for earlier. |
ce4c07df |
7 | |
8 | name 'DBIx-Class'; |
ce4c07df |
9 | perl_version '5.006001'; |
8e0f16f1 |
10 | all_from 'lib/DBIx/Class.pm'; |
ce4c07df |
11 | |
3a4251e2 |
12 | |
13 | test_requires 'Test::Builder' => 0.33; |
14 | test_requires 'Test::Deep' => 0; |
15 | test_requires 'Test::Exception' => 0; |
16 | test_requires 'Test::More' => 0.82; |
17 | test_requires 'Test::Warn' => 0.11; |
ce4c07df |
18 | |
2f8a12ff |
19 | # Core |
20 | requires 'List::Util' => 0; |
21 | requires 'Scalar::Util' => 0; |
22 | requires 'Storable' => 0; |
23 | |
ce4c07df |
24 | # Perl 5.8.0 doesn't have utf8::is_utf8() |
2f8a12ff |
25 | requires 'Encode' => 0 if ($] <= 5.008000); |
ce4c07df |
26 | |
3a4251e2 |
27 | # Dependencies (keep in alphabetical order) |
28 | requires 'Carp::Clan' => 6.0; |
29 | requires 'Class::Accessor::Grouped' => 0.08003; |
30 | requires 'Class::C3::Componentised' => 1.0005; |
31 | requires 'Class::Inspector' => 1.24; |
32 | requires 'Data::Page' => 2.00; |
33 | requires 'DBD::SQLite' => 1.25; |
34 | requires 'DBI' => 1.605; |
35 | requires 'JSON::Any' => 1.18; |
36 | requires 'MRO::Compat' => 0.09; |
37 | requires 'Module::Find' => 0.06; |
38 | requires 'Path::Class' => 0.16; |
39 | requires 'Scope::Guard' => 0.03; |
40 | requires 'SQL::Abstract' => 1.56; |
41 | requires 'SQL::Abstract::Limit' => 0.13; |
42 | requires 'Sub::Name' => 0.04; |
ce4c07df |
43 | |
82fae370 |
44 | recommends 'SQL::Translator' => 0.09004; |
45 | |
0ee285f3 |
46 | install_script (qw| |
47 | script/dbicadmin |
48 | |); |
ce4c07df |
49 | |
0ee285f3 |
50 | tests_recursive (qw| |
51 | t |
52 | |); |
ce4c07df |
53 | |
20ff58f2 |
54 | resources 'IRC' => 'irc://irc.perl.org/#dbix-class'; |
55 | resources 'license' => 'http://dev.perl.org/licenses/'; |
56 | resources 'repository' => 'http://dev.catalyst.perl.org/svnweb/bast/browse/DBIx-Class/'; |
57 | resources 'MailingList' => 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class'; |
58 | |
59 | |
c96454c3 |
60 | # re-build README and require extra modules for testing if we're in a checkout |
fe650234 |
61 | |
82fae370 |
62 | my %force_requires_if_author = ( |
c96454c3 |
63 | 'Test::Pod::Coverage' => 1.04, |
044e70c7 |
64 | 'Module::Install::Pod::Inherit' => 0.01, |
eb0bc670 |
65 | 'SQL::Translator' => 0.09007, |
9ac2c0f8 |
66 | |
67 | # CDBI-compat related |
82fae370 |
68 | 'DBIx::ContextualFetch' => 0, |
602fd807 |
69 | 'Class::DBI::Plugin::DeepAbstractSearch' => 0, |
82fae370 |
70 | 'Class::Trigger' => 0, |
97d61088 |
71 | 'Time::Piece::MySQL' => 0, |
82fae370 |
72 | 'Clone' => 0, |
971bc4b6 |
73 | 'Date::Simple' => 3.03, |
9ac2c0f8 |
74 | |
75 | # t/52cycle.t |
82fae370 |
76 | 'Test::Memory::Cycle' => 0, |
e43797df |
77 | 'Devel::Cycle' => 1.10, |
9ac2c0f8 |
78 | |
40f75181 |
79 | # t/36datetime.t |
c96454c3 |
80 | # t/60core.t |
40f75181 |
81 | 'DateTime::Format::SQLite' => 0, |
5fc1107f |
82 | |
40f75181 |
83 | # t/96_is_deteministic_value.t |
3a4251e2 |
84 | 'DateTime::Format::Strptime'=> 0, |
40f75181 |
85 | |
3a4251e2 |
86 | # t/93storage_replication.t |
450a317d |
87 | 'Moose', => 0.87, |
88 | 'MooseX::AttributeHelpers' => 0.21, |
89 | 'MooseX::Types', => 0.16, |
3a4251e2 |
90 | 'namespace::clean' => 0.11, |
91 | 'Hash::Merge', => 0.11, |
92 | |
93 | # database-dependent reqs |
94 | # |
9d2b098e |
95 | $ENV{DBICTEST_PG_DSN} |
3a4251e2 |
96 | ? ( |
97 | 'Sys::SigAction' => 0, |
ac45262b |
98 | 'DBD::Pg' => 2.009002, |
3a4251e2 |
99 | 'DateTime::Format::Pg' => 0, |
100 | ) : () |
9d2b098e |
101 | , |
102 | |
3a4251e2 |
103 | $ENV{DBICTEST_MYSQL_DSN} |
104 | ? ( |
105 | 'DateTime::Format::MySQL' => 0, |
106 | ) : () |
107 | , |
c96454c3 |
108 | |
3a4251e2 |
109 | $ENV{DBICTEST_ORACLE_DSN} |
110 | ? ( |
111 | 'DateTime::Format::Oracle' => 0, |
112 | ) : () |
113 | , |
fe650234 |
114 | ); |
115 | |
116 | if ($Module::Install::AUTHOR) { |
d7fda552 |
117 | warn <<'EOW'; |
118 | ****************************************************************************** |
119 | ****************************************************************************** |
120 | *** *** |
121 | *** AUTHOR MODE: all optional test dependencies converted to hard requires *** |
122 | *** *** |
123 | ****************************************************************************** |
124 | ****************************************************************************** |
125 | |
126 | EOW |
80ff5ae0 |
127 | |
3a4251e2 |
128 | foreach my $module (sort keys %force_requires_if_author) { |
80ff5ae0 |
129 | build_requires ($module => $force_requires_if_author{$module}); |
130 | } |
131 | |
7ff18dbd |
132 | print "Regenerating README\n"; |
80ff5ae0 |
133 | system('pod2text lib/DBIx/Class.pm > README'); |
3e110410 |
134 | |
7ff18dbd |
135 | if (-f 'MANIFEST') { |
136 | print "Removing MANIFEST\n"; |
137 | unlink 'MANIFEST'; |
138 | } |
044e70c7 |
139 | |
140 | eval { require Module::Install::Pod::Inherit }; |
f27af22a |
141 | PodInherit() if !$@; |
7ff18dbd |
142 | } |
80ff5ae0 |
143 | |
7ff18dbd |
144 | auto_install(); |
269228af |
145 | |
713cc98e |
146 | WriteAll(); |
269228af |
147 | |
80ff5ae0 |
148 | # Re-write META.yml to _exclude_ all forced requires (we do not want to ship this) |
713cc98e |
149 | if ($Module::Install::AUTHOR) { |
80ff5ae0 |
150 | |
151 | Meta->{values}{build_requires} = [ grep |
152 | { not exists $force_requires_if_author{$_->[0]} } |
153 | ( @{Meta->{values}{build_requires}} ) |
154 | ]; |
155 | |
713cc98e |
156 | Meta->write; |
157 | } |