require Devel::PartialDump 0.14, to avoid infinite loop bug
[gitmo/Moose.git] / inc / MakeMaker.pm
CommitLineData
004ac8d9 1package inc::MakeMaker;
2
3use Moose;
4
6bf5d14d 5use lib 'inc';
6
004ac8d9 7use MMHelper;
8
6bf5d14d 9extends 'Dist::Zilla::Plugin::MakeMaker::Awesome';
10
11override _build_MakeFile_PL_template => sub {
12 my $self = shift;
13
14 my $tmpl = super();
15
6ae2c8a1 16 my $ccflags = MMHelper::ccflags_dyn();
17 $tmpl =~ s/^(WriteMakefile\()/\$WriteMakefileArgs{CCFLAGS} = $ccflags;\n\n$1/m;
18
6bf5d14d 19 return $tmpl . "\n\n" . MMHelper::my_package_subs();
20};
21
22override _build_WriteMakefile_args => sub {
23 my $self = shift;
24
25 my $args = super();
26
27 return {
28 %{$args},
29 MMHelper::mm_args(),
30 };
31};
32
aa0d8521 33override test => sub {
34 my $self = shift;
35
36 local $ENV{PERL5LIB} = join ':',
37 grep {defined} @ENV{ 'PERL5LIB', 'DZIL_TEST_INC' };
38
39 super();
40};
41
6bf5d14d 421;