[Bast-commits] r6471 - DBIx-Class/0.08/trunk

ribasushi at dev.catalyst.perl.org ribasushi at dev.catalyst.perl.org
Sun May 31 07:42:35 GMT 2009


Author: ribasushi
Date: 2009-05-31 07:42:35 +0000 (Sun, 31 May 2009)
New Revision: 6471

Modified:
   DBIx-Class/0.08/trunk/Makefile.PL
Log:
Throw away the makefile SQLite test - it served its purpose

Modified: DBIx-Class/0.08/trunk/Makefile.PL
===================================================================
--- DBIx-Class/0.08/trunk/Makefile.PL	2009-05-31 07:37:37 UTC (rev 6470)
+++ DBIx-Class/0.08/trunk/Makefile.PL	2009-05-31 07:42:35 UTC (rev 6471)
@@ -9,10 +9,6 @@
 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,11 +112,9 @@
 
 EOW
 }
+
 auto_install;
 
-# Have all prerequisites, check DBD::SQLite sanity
-_check_sqlite() if (! $ENV{DBICTEST_NO_SQLITE_CHECK} );
-
 WriteAll();
 
 if ($Module::Install::AUTHOR) {
@@ -144,106 +138,3 @@
   ];
   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 (<<EOE);
-
-############################### WARNING #################################
-#                                                                       #
-# You are running a buggy version of DBD::SQLite known to randomly      #
-# segfault on errors.  Even if you have the latest CPAN module version, #
-# the sqlite3 dynamic library on this system might have been compiled   #
-# against an older buggy sqlite3 dev library (oddly DBD::SQLite will    #
-# prefer the system library against the one bundled with it). You are   #
-# strongly advised to resolve this issue before proceeding.             #
-#                                                                       #
-#########################################################################
-
-EOE
-          my $ans = prompt (
-            "The test suite of this module is almost certain to fail.\n"
-            . 'Do you really want to continue?',
-            'no',
-          );
-
-          exit 0 unless ($ans =~ /^y(es)?$/i);
-      }
-    }
-  }
-
-  else {  # the win32 version
-
-    print <<'EOW';
-######################################################################
-#                                                                    #
-# A short stress-testing of DBD::SQLite will follow. If you have a   #
-# buggy library this might very well be the last text you will see   #
-# before the installation silently terminates. If this happens it    #
-# would mean that you are running a buggy version of DBD::SQLite     #
-# known to randomly segfault on errors. Even if you have the latest  #
-# CPAN module version, the system sqlite3 dynamic library might have #
-# been compiled against an older buggy sqlite3 dev library (oddly    #
-# DBD::SQLite will prefer the system library against the one bundled #
-# with it). You are strongly advised to resolve this issue before    #
-# proceeding.                                                        #
-#                                                                    #
-# If this happens to you (this text is the last thing you see), and  #
-# you just want to install this module without worrying about the    #
-# tests (which will almost certainly fail) - set the environment     #
-# variable DBICTEST_NO_SQLITE_CHECK to a true value and try again.   #
-#                                                                    #
-######################################################################
-
-EOW
-
-    _torture_sqlite();
-  }
-}
-
-sub _torture_sqlite {
-  require DBI;
-
-  for (1 .. 100) {
-    my $dbh = DBI->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;
-  }
-}




More information about the Bast-commits mailing list