use lib "$FindBin::Bin/lib";
use DBIx::Class::Optional::Dependencies;
-# adjust ENV for $AUTHOR system() calls
-use Config;
-$ENV{PERL5LIB} = join ($Config{path_sep}, @INC);
-
-use Getopt::Long ();
-
-my $getopt = Getopt::Long::Parser->new(
- config => [qw/gnu_getopt bundling_override no_ignore_case pass_through/]
-);
-my $args = {
- skip_author_deps => undef,
-};
-$getopt->getoptions($args, 'skip_author_deps');
-if (@ARGV) {
- warn "\nIgnoring unrecognized option(s): @ARGV\n\n";
-}
-
# get cpanX --installdeps . to behave in a checkout (most users do not need
# the deps for a full test suite run, and if they do - there's MI::AutoInstall
# for that)
'File::Path' => '2.07',
};
+
+# 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
+
+require Getopt::Long;
+my $getopt = Getopt::Long::Parser->new(
+ config => [qw/gnu_getopt bundling_override no_ignore_case pass_through/]
+);
+my $args = {
+ skip_author_deps => undef,
+};
+$getopt->getoptions($args, 'skip_author_deps');
+if (@ARGV) {
+ warn "\nIgnoring unrecognized option(s): @ARGV\n\n";
+}
+
# this is so we can order requires alphabetically
# copies are needed for author requires injection
my $reqs = {
# re-create various autogenerated documentation bits
if ($Module::Install::AUTHOR) {
+ # adjust ENV for $AUTHOR system() calls
+ require Config;
+ $ENV{PERL5LIB} = join ($Config::Config{path_sep}, @INC);
+
print "Regenerating README\n";
system('pod2text lib/DBIx/Class.pm > README');