Better handling of bogus tmpdir returned by File::Spec on MSWin32
[dbsrgits/DBIx-Class.git] / Makefile.PL
index a88f64e..77abec6 100644 (file)
@@ -119,27 +119,6 @@ if ($ENV{DBICTEST_SQLT_DEPLOY}) {
   }
 }
 
-# Bail out on parallel testing
-if (
-  ($ENV{HARNESS_OPTIONS}||'') =~ / (?: ^ | \: ) j(\d+) /x
-    and
-  $1 > 1
-) { die <<EOP }
-
-******************************************************************************
-******************************************************************************
-***                                                                        ***
-***      PARALLEL TESTING DETECTED ( \$ENV{HARNESS_OPTIONS} = 'j$1' )        ***
-***                                                                        ***
-*** DBIC tests WILL FAIL. It is harder to make them parallel-friendly than ***
-*** it should be (though work is underway). In the meantime you will have  ***
-*** to adjust your environment and re-run the installation. Sorry!         ***
-***                                                                        ***
-******************************************************************************
-******************************************************************************
-
-EOP
-
 # this is so we can order requires alphabetically
 # copies are needed for potential author requires injection
 my $reqs = {
@@ -169,9 +148,13 @@ if ($Module::Install::AUTHOR  and ! $ENV{MAKELEVEL}) {
   # string-eval, not do(), because we need to provide the
   # $reqs and $*_requires lexicals to the included file
   # (some includes *do* modify $reqs above)
-  for (sort glob ( File::Spec->catfile('maint', 'Makefile.PL.inc', '*') ) ) {
-    eval scalar do { local (@ARGV, $/) = $_; <> }
-      or die ($@ || $!);
+  for my $inc (sort glob ( File::Spec->catfile('maint', 'Makefile.PL.inc', '*') ) ) {
+    my $src = do { local (@ARGV, $/) = $inc; <> } or die $!;
+    eval "use warnings; use strict; $src" or die sprintf
+      "Failed execution of %s: %s\n",
+      $inc,
+      ($@ || $! || 'Unknown error'),
+    ;
   }
 }
 else {