diff options
Diffstat (limited to 'inc/MakeMaker.pm')
-rw-r--r-- | inc/MakeMaker.pm | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/inc/MakeMaker.pm b/inc/MakeMaker.pm index 25cbf7e..bb31600 100644 --- a/inc/MakeMaker.pm +++ b/inc/MakeMaker.pm @@ -1,5 +1,6 @@ package inc::MakeMaker; use Moose; +use inc::MMHelper; extends 'Dist::Zilla::Plugin::MakeMaker::Awesome'; @@ -7,15 +8,7 @@ around _build_MakeFile_PL_template => sub { my $orig = shift; my $self = shift; my $tmpl = $self->$orig; - my $extra = <<'EXTRA'; -use Config; -use Devel::CallParser 'callparser1_h', 'callparser_linkable'; -open my $fh, '>', 'callparser1.h' or die "Couldn't write to callparser1.h"; -$fh->print(callparser1_h); -my @linkable = callparser_linkable; -unshift @linkable, "Keyword$Config{obj_ext}" if @linkable; -$WriteMakefileArgs{OBJECT} = join(' ', @linkable) if @linkable; -EXTRA + my $extra = inc::MMHelper::makefile_pl_extra; $tmpl =~ s/^(WriteMakefile\()/$extra\n$1/m or die "Couldn't fix template"; return $tmpl; @@ -25,10 +18,10 @@ around _build_WriteMakefile_args => sub { my $orig = shift; my $self = shift; my $args = $self->$orig(@_); - $args->{clean} = { - FILES => "callparser1.h", - }; - return $args; + return { + %$args, + %{ inc::MMHelper::mm_args() }, + } }; __PACKAGE__->meta->make_immutable; |