2 use warnings FATAL => 'all';
5 use ExtUtils::HasCompiler 'can_compile_loadable_object';
8 = ! parse_args()->{PUREPERL_ONLY}
9 && can_compile_loadable_object(quiet => 1);
13 multidimensional => 0,
14 'bareword::filehandles' => 0,
21 configure => { requires => { } },
22 build => { requires => { } },
23 test => { requires => {
34 develop => { requires => {
36 'Test::Pod::Coverage' => 0,
37 'Pod::Coverage::CountParents' => 0,
42 # r/w: p5sagit@git.shadowcat.co.uk:strictures.git
44 url => 'git://git.shadowcat.co.uk/p5sagit/strictures.git',
45 web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/strictures.git',
49 mailto => 'bug-strictures@rt.cpan.org',
50 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=strictures',
52 license => [ 'http://dev.perl.org/licenses/' ],
55 directory => [ 't', 'xt', 'inc' ]
57 x_authority => 'cpan:MSTROUT',
62 ("$]" >= 5.008004 && $have_compiler ? %extra_prereqs : () )
68 require ExtUtils::MakeMaker;
69 require Text::ParseWords;
70 ExtUtils::MakeMaker::parse_args(
72 Text::ParseWords::shellwords($ENV{PERL_MM_OPT} || ''),
75 return $tmp->{ARGS} || {};
78 ## BOILERPLATE ###############################################################
79 require ExtUtils::MakeMaker;
80 (do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
82 # have to do this since old EUMM dev releases miss the eval $VERSION line
83 my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
84 my $mymeta = $eumm_version >= 6.57_02;
85 my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
87 ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
88 ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
89 $META{license} = [ $META{license} ]
90 if $META{license} && !ref $META{license};
91 $MM_ARGS{LICENSE} = $META{license}[0]
92 if $META{license} && $eumm_version >= 6.30;
93 $MM_ARGS{NO_MYMETA} = 1
95 $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
98 for (qw(configure build test runtime)) {
99 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
100 my $r = $MM_ARGS{$key} = {
101 %{$META{prereqs}{$_}{requires} || {}},
102 %{delete $MM_ARGS{$key} || {}},
104 defined $r->{$_} or delete $r->{$_} for keys %$r;
107 $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
109 delete $MM_ARGS{MIN_PERL_VERSION}
110 if $eumm_version < 6.47_01;
111 $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
112 if $eumm_version < 6.63_03;
113 $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
114 if $eumm_version < 6.55_01;
115 delete $MM_ARGS{CONFIGURE_REQUIRES}
116 if $eumm_version < 6.51_03;
118 ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
119 ## END BOILERPLATE ###########################################################