1 use inc::Module::Install 0.67;
5 use 5.006001; # delete this line if you want to send patches for earlier.
8 perl_version '5.006001';
9 all_from 'lib/DBIx/Class.pm';
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;
16 requires 'Class::C3::Componentised' => 0;
17 requires 'Storable' => 0;
18 requires 'Carp::Clan' => 0;
19 requires 'DBI' => 1.40;
20 requires 'Module::Find' => 0;
21 requires 'Class::Inspector' => 0;
22 requires 'Class::Accessor::Grouped' => 0.05002;
23 requires 'JSON::Any' => 1.00;
24 requires 'Scope::Guard' => 0.03;
25 requires 'Path::Class' => 0;
26 requires 'List::Util' => 1.19;
27 requires 'Sub::Name' => 0.04;
29 # Perl 5.8.0 doesn't have utf8::is_utf8()
30 requires 'Encode' => 0 if ($] <= 5.008000);
32 test_requires 'DBD::SQLite' => 1.14;
33 test_requires 'Test::Builder' => 0.33;
34 test_requires 'Test::Warn' => 0.11;
35 test_requires 'Test::Exception' => 0;
36 test_requires 'FindBin' => 0;
38 install_script 'script/dbicadmin';
40 tests "t/*.t t/*/*.t";
42 # re-build README and require CDBI modules for testing if we're in a checkout
44 my @force_build_requires_if_author = qw(
53 if ($Module::Install::AUTHOR) {
55 foreach my $module (@force_build_requires_if_author) {
56 build_requires $module;
59 system('pod2text lib/DBIx/Class.pm > README');
66 # Have all prerequisites, check DBD::SQLite sanity
69 if (not defined $pid) {
70 die "Unable to fork(): $!";
76 $dbh = DBI->connect ('dbi:SQLite::memory:', undef, undef, {
81 or die "Unable to connect to database: $@";
82 $dbh->do ('CREATE TABLE name_with_no_columns'); # a subtle syntax error
83 $dbh->do ('COMMIT'); # followed by commit
95 ############################### WARNING ###################################
97 # You are running a buggy version of DBD::SQLite known to randomly #
98 # segfault on errors. Even if you have the latest CPAN module version, #
99 # the actual sqlite3.so might have been compiled against an older buggy #
100 # sqlite3 dev library. You are strongly advised to update DBD::SQLite. #
102 ###########################################################################
106 "The test suite of this module is almost certain to fail.\n"
107 . 'Do you really want to continue?',
110 exit 0 unless ($ans =~ /^y(es)?$/i);
119 if ($Module::Install::AUTHOR) {
120 # Need to do this _after_ WriteAll else it looses track of them
121 Meta->{values}{build_requires} = [ grep {
123 foreach my $module (@force_build_requires_if_author) {
124 if ($_->[0] =~ /$module/) {
130 } @{Meta->{values}{build_requires}} ];
132 my @scalar_keys = Module::Install::Metadata::Meta_TupleKeys();
133 my $cr = Module::Install::Metadata->can("Meta_TupleKeys");
135 no warnings 'redefine';
136 *Module::Install::Metadata::Meta_TupleKeys = sub {
137 return $cr->(@_), 'resources';
140 Meta->{values}{resources} = [
141 [ 'MailingList', 'http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/dbix-class' ],
142 [ 'IRC', 'irc://irc.perl.org/#dbix-class' ],
143 [ 'license', 'http://dev.perl.org/licenses/' ],
144 [ 'repository', 'http://dev.catalyst.perl.org/svnweb/bast/browse/DBIx-Class/' ],