From: Peter Rabbitson Date: Mon, 9 Apr 2012 02:53:24 +0000 (+0200) Subject: Enhance 19b088d1 to add SQLT dep regardless of Makefile mode X-Git-Tag: v0.08197~50 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=dbsrgits%2FDBIx-Class.git;a=commitdiff_plain;h=20beaf5fcd9bf0ee24805ee60013ad616e0f5363 Enhance 19b088d1 to add SQLT dep regardless of Makefile mode --- diff --git a/Makefile.PL b/Makefile.PL index 2ecd83f..dd4d412 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -102,6 +102,20 @@ if (-e '.git' or -e '.svn') { test_requires 'bareword::filehandles' => '0.003'; } +# if the user has this env var set and no SQLT installed, tests will fail +# same rationale for direct test_requires as the strictures stuff above +# (even though no dist will be created from this) +# we force this req regarless of author_deps, worst case scenario it will +# be specified twice +if ($ENV{DBICTEST_SQLT_DEPLOY}) { + local @INC = ('lib', @INC); + require DBIx::Class::Optional::Dependencies; + my $dep_req = DBIx::Class::Optional::Dependencies->req_list_for('deploy'); + for (keys %$dep_req) { + test_requires ($_ => $dep_req->{$_}) + } +} + # Bail out on parallel testing if ( ($ENV{HARNESS_OPTIONS}||'') =~ / (?: ^ | \: ) j(\d+) /x @@ -167,18 +181,6 @@ nonauthor_stop_distdir_creation: \t\$(NOECHO) \$(ECHO) Creation of dists in non-author mode is not allowed \t\$(NOECHO) \$(FALSE) EOP - - # if the user has this env var set and no SQLT installed, tests will fail - # same rationale for direct test_requires as the strictures stuff above - # (even though no dist will be created from this) - if ($ENV{DBICTEST_SQLT_DEPLOY}) { - local @INC = ('lib', @INC); - require DBIx::Class::Optional::Dependencies; - my $dep_req = DBIx::Class::Optional::Dependencies->req_list_for('deploy'); - for (keys %$dep_req) { - test_requires ($_ => $dep_req->{$_}) - } - } } # compose final req list, for alphabetical ordering