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 => {
32 develop => { requires => {
37 # r/w: p5sagit@git.shadowcat.co.uk:strictures.git
39 url => 'git://git.shadowcat.co.uk/p5sagit/strictures.git',
40 web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/strictures.git',
44 mailto => 'bug-strictures@rt.cpan.org',
45 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=strictures',
47 license => [ 'http://dev.perl.org/licenses/' ],
50 directory => [ 't', 'xt' ]
56 ($] >= 5.008004 && $have_compiler ? %extra_prereqs : () )
58 realclean => { FILES => [ 'Distar/', 'MANIFEST*' ] },
63 require ExtUtils::MakeMaker;
64 require Text::ParseWords;
65 ExtUtils::MakeMaker::parse_args(
67 Text::ParseWords::shellwords($ENV{PERL_MM_OPT} || ''),
70 return $tmp->{ARGS} || {};
73 ##############################################################################
74 require ExtUtils::MakeMaker;
75 (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
77 # have to do this since old EUMM dev releases miss the eval $VERSION line
78 my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
79 my $mymeta = $eumm_version >= 6.57_02;
80 my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
82 ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
83 ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
84 $MM_ARGS{LICENSE} = $META{license}
85 if $eumm_version >= 6.30;
86 $MM_ARGS{NO_MYMETA} = 1
88 $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
91 for (qw(configure build test runtime)) {
92 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
93 my $r = $MM_ARGS{$key} = {
94 %{$META{prereqs}{$_}{requires} || {}},
95 %{delete $MM_ARGS{$key} || {}},
97 defined $r->{$_} or delete $r->{$_} for keys %$r;
100 $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
102 delete $MM_ARGS{MIN_PERL_VERSION}
103 if $eumm_version < 6.47_01;
104 $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
105 if $eumm_version < 6.63_03;
106 $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
107 if $eumm_version < 6.55_01;
108 delete $MM_ARGS{CONFIGURE_REQUIRES}
109 if $eumm_version < 6.51_03;
111 ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);