Browse files

Call ExtUtils::Depends from the built Makefile.PL, not when building it

  • Loading branch information...
1 parent 49c8fa7 commit 61bf4c0586a0193eabf75a853730a97fd438420d @ilmari committed Nov 18, 2010
Showing with 10 additions and 8 deletions.
  1. +3 −0 Changes
  2. +3 −0 dist.ini
  3. +4 −8 inc/MultidimensionalMakeMaker.pm
View
3 Changes
@@ -1,5 +1,8 @@
Revision history for multidimensional
+ - Call ExtUtils::Depends from the built Makefile.PL,
+ not when building it
+
0.002 2010-11-16
- Don't disallow explicit join($;, ...) in hash subscript
View
3 dist.ini
@@ -11,6 +11,9 @@ copyright_year = 2010
-bundle = @Basic
-remove = MakeMaker
+[Prereqs / ConfigureRequires]
+ExtUtils::Depends = 0
+
[=inc::MultidimensionalMakeMaker / MultidimensionalMakeMaker]
[PkgVersion]
View
12 inc/MultidimensionalMakeMaker.pm
@@ -3,16 +3,12 @@ use Moose;
extends 'Dist::Zilla::Plugin::MakeMaker::Awesome';
-use ExtUtils::Depends;
-
-override _build_WriteMakefile_args => sub {
+override _build_WriteMakefile_dump => sub {
my ($self) = @_;
- my $pkg = ExtUtils::Depends->new('multidimensional', 'B::Hooks::OP::Check');
+ my $str = super();
- return +{
- %{super()},
- $pkg->get_makefile_vars,
- };
+ $str =~ s/^(\s*)(.*)\n\);$/$1$2,\n$1do{ require ExtUtils::Depends; ExtUtils::Depends->new('multidimensional', 'B::Hooks::OP::Check')->get_makefile_vars }\n);/m;
+ return $str;
};
__PACKAGE__->meta->make_immutable;

0 comments on commit 61bf4c0

Please sign in to comment.