From: Karen Etheridge Date: Tue, 15 Jul 2014 03:29:52 +0000 (-0700) Subject: when Makefile.PL is run non-interactively, default features are added to runtime... X-Git-Tag: v1.003026~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=dce0d71ad34d70819aeed27b017b981b873a04e9;p=p5sagit%2FDevel-REPL.git when Makefile.PL is run non-interactively, default features are added to runtime prereqs This overcomes issues encountered with versions since we switched off of Module::Install and its mechanism for installing optional features (v1.003021 and later). --- diff --git a/Changes b/Changes index bb61744..558256b 100644 --- a/Changes +++ b/Changes @@ -1,6 +1,8 @@ Revision history for {{ $dist->name }} {{ $NEXT }} + - fix inclusion of of optional plugin prereqs when installation is run + non-interactively 1.003025 2013-09-29 22:36:59Z (Karen Etheridge) - re-release with fixed prerequisites in metadata diff --git a/dist.ini b/dist.ini index d676099..1983255 100644 --- a/dist.ini +++ b/dist.ini @@ -14,6 +14,7 @@ skip = Devel/REPL/Plugin/CompletionDriver/ :version = 0.025 -remove = PodWeaver server = p5sagit +installer = MakeMaker ; Module::Build::Tiny cannot handle dynamic_config => 1 Authority.authority = cpan:PHAYLON Test::MinimumVersion.max_target_perl = 5.008001 -remove = PodCoverageTests ; XXX TODO @@ -36,6 +37,22 @@ Task::Weaken = 0 [Prereqs / RuntimeRecommends] PPI::XS = 0.902 +[DynamicPrereqs] +; add all x_default=>1 optional prereqs to PREREQ_PM if not running +; interactively, or defaults explicitly requested. +-raw = if ($ENV{PERL_MM_USE_DEFAULT} or +-raw = not (-t STDIN && (-t STDOUT || !(-f STDOUT || -c STDOUT)))) { +-raw = # optional feature defaults +-raw = my %defaults = ( +-raw = 'PPI' => '0', +-raw = 'Data::Dump::Streamer' => '0', +-raw = 'Data::Dumper::Concise' => '0', +-raw = 'File::Next' => '0', +-raw = 'B::Keywords' => '0', +-raw = 'Lexical::Persistence' => '0', +-raw = ); +-raw = $WriteMakefileArgs{PREREQ_PM}{$_} = $FallbackPrereqs{$_} = $defaults{$_} foreach (keys %defaults); +-raw = } [OptionalFeature / Completion] :version = 0.005