2 use warnings FATAL => 'all';
6 = ! parse_args()->{PUREPERL_ONLY}
7 && eval { require ExtUtils::CBuilder; 1 }
8 && ExtUtils::CBuilder->new->have_compiler;
12 multidimensional => 0,
13 'bareword::filehandles' => 0,
20 configure => { requires => { } },
21 build => { requires => { } },
22 test => { requires => {
33 develop => { requires => {
38 # r/w: p5sagit@git.shadowcat.co.uk:strictures.git
40 url => 'git://git.shadowcat.co.uk/p5sagit/strictures.git',
41 web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/strictures.git',
45 mailto => 'bug-strictures@rt.cpan.org',
46 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=strictures',
48 license => [ 'http://dev.perl.org/licenses/' ],
51 directory => [ 't', 'xt' ]
57 ($] >= 5.008004 && $have_compiler ? %extra_prereqs : () )
59 realclean => { FILES => [ 'Distar/', 'MANIFEST*' ] },
64 require ExtUtils::MakeMaker;
65 require Text::ParseWords;
66 ExtUtils::MakeMaker::parse_args(
68 Text::ParseWords::shellwords($ENV{PERL_MM_OPT} || ''),
71 return $tmp->{ARGS} || {};
74 ##############################################################################
75 require ExtUtils::MakeMaker;
76 (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
78 # have to do this since old EUMM dev releases miss the eval $VERSION line
79 my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
80 my $mymeta = $eumm_version >= 6.57_02;
81 my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
83 ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
84 ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
85 $MM_ARGS{LICENSE} = $META{license}
86 if $eumm_version >= 6.30;
87 $MM_ARGS{NO_MYMETA} = 1
89 $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
92 for (qw(configure build test runtime)) {
93 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
94 my $r = $MM_ARGS{$key} = {
95 %{$META{prereqs}{$_}{requires} || {}},
96 %{delete $MM_ARGS{$key} || {}},
98 defined $r->{$_} or delete $r->{$_} for keys %$r;
101 $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
103 delete $MM_ARGS{MIN_PERL_VERSION}
104 if $eumm_version < 6.47_01;
105 $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
106 if $eumm_version < 6.63_03;
107 $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
108 if $eumm_version < 6.55_01;
109 delete $MM_ARGS{CONFIGURE_REQUIRES}
110 if $eumm_version < 6.51_03;
112 ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);