From: Karen Etheridge Date: Sun, 27 Jul 2014 01:41:33 +0000 (-0700) Subject: more sophisticated code is needed if we actually have build-phase prereqs X-Git-Tag: v1.002003~4 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b207f99eb789e573a8d7cc6b03ff4488235f62b2;p=p5sagit%2FJSON-MaybeXS.git more sophisticated code is needed if we actually have build-phase prereqs --- diff --git a/Makefile.PL b/Makefile.PL index 76a585d..81d1a51 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -67,6 +67,8 @@ for (qw(configure build test runtime)) { defined $r->{$_} or delete $r->{$_} for keys %$r; } +# dynamic prereqs get added here. + # we require Cpanel::JSON::XS, except if JSON::XS is already installed. # (we also always recommend Cpanel::JSON::XS, just to make sure.) $WriteMakefileArgs{PREREQ_PM}{'Cpanel::JSON::XS'} = '2.3310' @@ -74,6 +76,9 @@ $WriteMakefileArgs{PREREQ_PM}{'Cpanel::JSON::XS'} = '2.3310' $WriteMakefileArgs{MIN_PERL_VERSION} = delete $WriteMakefileArgs{PREREQ_PM}{perl} || 0; +die 'attention developer: you need to do a sane meta merge here!' + if keys %{$WriteMakefileArgs{BUILD_REQUIRES}}; + $WriteMakefileArgs{BUILD_REQUIRES} = { %{$WriteMakefileArgs{BUILD_REQUIRES} || {}}, %{delete $WriteMakefileArgs{TEST_REQUIRES}}