From: Graham Knop Date: Mon, 6 Jan 2014 08:28:46 +0000 (-0500) Subject: don't make extra checks hard deps if configure_requires unsupported X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=38667eeab21516fe997896868b52e6a4a693c898;p=p5sagit%2Fstrictures.git don't make extra checks hard deps if configure_requires unsupported --- diff --git a/Makefile.PL b/Makefile.PL index 2caeffd..6d98bf8 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -40,6 +40,14 @@ my $have_compiler = ! parse_args()->{PUREPERL_ONLY} && can_xs(); +my $support_configure_requires + = $ENV{PERL5_CPANM_IS_RUNNING} + || !$ENV{PERL5_CPAN_IS_RUNNING} + || ! eval { require CPAN } + || $CPAN::VERSION > 1.94_55 + || $CPAN::VERSION > 1.91_51 && $CPAN::VERSION < 1.93_51; + + WriteMakefile( NAME => 'strictures', VERSION_FROM => 'lib/strictures.pm', @@ -69,13 +77,13 @@ WriteMakefile( }, }, runtime => { - ( $] >= 5.008004 && !$have_compiler + ( $] >= 5.008004 && !($have_compiler && $support_configure_requires) ? ( recommends => \%extra_prereqs ) : () ), }, }, }, - ($] >= 5.008004 && $have_compiler + ($] >= 5.008004 && $have_compiler && $support_configure_requires ? ( PREREQ_PM => \%extra_prereqs ) : () ), );