From: Peter Rabbitson Date: Tue, 21 Sep 2010 04:32:10 +0000 (+0200) Subject: Disable author mode during cpanX --installdeps . X-Git-Tag: v0.08124~72 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=d1dc7a982d6ecb158b273cd893b6703875eac074;p=dbsrgits%2FDBIx-Class.git Disable author mode during cpanX --installdeps . --- diff --git a/Makefile.PL b/Makefile.PL index a714900..cac6e77 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -24,6 +24,14 @@ 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) +## +## DO NOT USE THIS HACK IN YOUR DISTS!!! (it makes #toolchain sad) +## +$Module::Install::AUTHOR = 0 if (grep { $ENV{"PERL5_${_}_IS_RUNNING"} } (qw/CPANM CPANPLUS CPAN/) ); + ### ### DO NOT ADD OPTIONAL DEPENDENCIES HERE, EVEN AS recommends() ### All of them should go to DBIx::Class::Optional::Dependencies @@ -176,7 +184,7 @@ eval { recursive_author_tests (qw/xt/); 1; } || do { - unless ($args->{skip_author_deps}) { + if ($Module::Install::AUTHOR && ! $args->{skip_author_deps}) { my $err = $@; eval { require Module::Install::AuthorTests } || die "\nYou need Module::Install::AuthorTests installed to run this Makefile.PL in author mode (or supply --skip_author_deps):\n\n$@\n";