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