From: Peter Rabbitson Date: Sun, 31 May 2009 07:42:35 +0000 (+0000) Subject: Throw away the makefile SQLite test - it served its purpose X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=6b43c35ccfef3181eac3b4c80e9d8d8d19410631;p=dbsrgits%2FDBIx-Class-Historic.git Throw away the makefile SQLite test - it served its purpose --- diff --git a/Makefile.PL b/Makefile.PL index 9fdd6c3..10fe1db 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -9,10 +9,6 @@ name 'DBIx-Class'; perl_version '5.006001'; all_from 'lib/DBIx/Class.pm'; -# configure_requires so _check_sqlite() below can run -# remove once test deprecated -configure_requires 'DBD::SQLite'; - requires 'DBD::SQLite' => 1.25; requires 'Data::Page' => 2.00; requires 'SQL::Abstract' => 1.55; @@ -116,10 +112,8 @@ if ($Module::Install::AUTHOR) { EOW } -auto_install; -# Have all prerequisites, check DBD::SQLite sanity -_check_sqlite() if (! $ENV{DBICTEST_NO_SQLITE_CHECK} ); +auto_install; WriteAll(); @@ -144,106 +138,3 @@ if ($Module::Install::AUTHOR) { ]; Meta->write; } - - -# This is legacy code. Latest DBD::SQLite developments fixed all known bugs -# in this area. Remove before some arbitrary next version -sub _check_sqlite { - - # Win32 does not have real fork()s so a segfault will bring - # everything down. Warn about it below, and don't try fork() - if ($^O ne 'MSWin32') { - - my $pid = fork(); - if (not defined $pid) { - die "Unable to fork(): $!"; - } - elsif (! $pid) { - _torture_sqlite(); - exit 0; - } - else { - eval { - local $SIG{ALRM} = sub { die "timeout\n" }; - alarm 5; - wait(); - alarm 0; - }; - my $exception = $@; - - my $sig = $? & 127; - - # make sure process actually dies - $exception && kill POSIX::SIGKILL(), $pid; - - if ($exception || $sig == POSIX::SIGSEGV() || $sig == POSIX::SIGABRT() - || $sig == 7) { # 7 == SIGBUS, haven't seen it but just in case - warn (<connect ('dbi:SQLite::memory:', undef, undef, { - AutoCommit => 1, - RaiseError => 0, - PrintError => 0, - }) or die "Unable to connect to database: $@"; - - $dbh->do ('CREATE TABLE name_with_no_columns'); # a subtle syntax error - $dbh->do ('COMMIT'); # followed by commit - $dbh->disconnect; - } -}