Commit | Line | Data |
737416a4 |
1 | use inc::Module::Install 0.67; |
fe650234 |
2 | use strict; |
3 | use warnings; |
4 | |
5 | use 5.006001; # delete this line if you want to send patches for earlier. |
ce4c07df |
6 | |
7 | name 'DBIx-Class'; |
ce4c07df |
8 | perl_version '5.006001'; |
8e0f16f1 |
9 | all_from 'lib/DBIx/Class.pm'; |
ce4c07df |
10 | |
ce4c07df |
11 | requires 'Data::Page' => 2.00; |
12 | requires 'Scalar::Util' => 0; |
13 | requires 'SQL::Abstract' => 1.20; |
14 | requires 'SQL::Abstract::Limit' => 0.101; |
15 | requires 'Class::C3' => 0.13; |
1680d317 |
16 | requires 'Class::C3::Componentised' => 0; |
ce4c07df |
17 | requires 'Storable' => 0; |
ce4c07df |
18 | requires 'Carp::Clan' => 0; |
19 | requires 'DBI' => 1.40; |
20 | requires 'Module::Find' => 0; |
21 | requires 'Class::Inspector' => 0; |
1d4e109a |
22 | requires 'Class::Accessor::Grouped' => 0.05002; |
c843f5e4 |
23 | requires 'JSON::Any' => 1.00; |
9c6d6d93 |
24 | requires 'Scope::Guard' => 0.03; |
8026d0eb |
25 | requires 'Path::Class' => 0; |
26ab719a |
26 | requires 'List::Util' => 1.19; |
ddc0a6c8 |
27 | requires 'Sub::Name' => 0.04; |
ce4c07df |
28 | |
29 | # Perl 5.8.0 doesn't have utf8::is_utf8() |
30 | requires 'Encode' => 0 if ($] <= 5.008000); |
31 | |
f947585b |
32 | test_requires 'DBD::SQLite' => 1.13; |
33 | test_requires 'Test::Builder' => 0.33; |
97aca715 |
34 | test_requires 'Test::Warn' => 0.11; |
f947585b |
35 | test_requires 'Test::NoWarnings' => 0.08; |
36 | test_requires 'Test::Exception' => 0; |
ce4c07df |
37 | |
38 | install_script 'script/dbicadmin'; |
39 | |
40 | tests "t/*.t t/*/*.t"; |
41 | |
1543db24 |
42 | # re-build README and require CDBI modules for testing if we're in a checkout |
fe650234 |
43 | |
44 | my @force_build_requires_if_author = qw( |
45 | DBIx::ContextualFetch |
46 | Class::Trigger |
47 | Time::Piece |
a8e7500d |
48 | Clone |
49 | Test::Pod::Coverage |
50 | Test::Memory::Cycle |
fe650234 |
51 | ); |
52 | |
53 | if ($Module::Install::AUTHOR) { |
54 | |
55 | foreach my $module (@force_build_requires_if_author) { |
56 | build_requires $module; |
57 | } |
09d46657 |
58 | |
1543db24 |
59 | system('pod2text lib/DBIx/Class.pm > README'); |
ff132c6f |
60 | } |
61 | |
62 | auto_provides; |
63 | |
3e110410 |
64 | auto_install; |
65 | |
ce4c07df |
66 | WriteAll; |
09d46657 |
67 | |
68 | |
69 | if ($Module::Install::AUTHOR) { |
70 | # Need to do this _after_ WriteAll else it looses track of them |
71 | Meta->{values}{build_requires} = [ grep { |
fe650234 |
72 | my $ok = 1; |
73 | foreach my $module (@force_build_requires_if_author) { |
74 | if ($_->[0] =~ /$module/) { |
75 | $ok = 0; |
76 | last; |
77 | } |
78 | } |
79 | $ok; |
09d46657 |
80 | } @{Meta->{values}{build_requires}} ]; |
81 | |
82 | my @scalar_keys = Module::Install::Metadata::Meta_TupleKeys(); |
fe650234 |
83 | my $cr = Module::Install::Metadata->can("Meta_TupleKeys"); |
84 | { |
85 | no warnings 'redefine'; |
86 | *Module::Install::Metadata::Meta_TupleKeys = sub { |
87 | return $cr->(@_), 'resources'; |
88 | }; |
09d46657 |
89 | } |
90 | Meta->{values}{resources} = [ |
91 | [ 'MailingList', 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class' ], |
92 | [ 'IRC', 'irc://irc.perl.org/#dbix-class' ], |
100dd0a8 |
93 | [ 'license', 'http://dev.perl.org/licenses/' ], |
94 | [ 'repository', 'http://dev.catalyst.perl.org/svnweb/bast/browse/DBIx-Class/' ], |
09d46657 |
95 | ]; |
96 | Meta->write; |
97 | } |
98 | |
99 | |
100 | |