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,
22 configure => { requires => { } },
23 build => { requires => { } },
24 test => { requires => {
35 develop => { requires => {
37 'Test::Pod::Coverage' => 0,
38 'Pod::Coverage::CountParents' => 0,
43 # GitHub mirrors from Shadowcat. We list it so we can get pull requests.
44 # The canonical repo is:
45 # r/o: git://git.shadowcat.co.uk/p5sagit/strictures.git
46 # r/w: p5sagit@git.shadowcat.co.uk:strictures.git
47 # web: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/strictures.git
49 url => 'https://github.com/p5sagit/strictures.git',
50 web => 'https://github.com/p5sagit/strictures',
54 mailto => 'bug-strictures@rt.cpan.org',
55 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=strictures',
57 license => [ 'http://dev.perl.org/licenses/' ],
60 directory => [ 't', 'xt', 'inc' ]
62 x_authority => 'cpan:MSTROUT',
63 x_contributors => [ # manually added, from git shortlog -e -s -n
64 'Graham Knop <haarg@haarg.org>',
65 'Karen Etheridge <ether@cpan.org>',
66 'Matt S Trout <mst@shadowcat.co.uk>',
67 'Peter Rabbitson <ribasushi@cpan.org>',
68 'Christian Walde <walde.christian@googlemail.com>',
69 'Diab Jerius <djerius@cfa.harvard.edu>',
75 ("$]" >= 5.008004 && $have_compiler ? %extra_prereqs : () )
81 require ExtUtils::MakeMaker;
82 require Text::ParseWords;
83 ExtUtils::MakeMaker::parse_args(
85 Text::ParseWords::shellwords($ENV{PERL_MM_OPT} || ''),
88 return $tmp->{ARGS} || {};
91 ## BOILERPLATE ###############################################################
92 require ExtUtils::MakeMaker;
93 (do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
95 # have to do this since old EUMM dev releases miss the eval $VERSION line
96 my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
97 my $mymeta = $eumm_version >= 6.57_02;
98 my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
100 ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
101 ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
102 $META{license} = [ $META{license} ]
103 if $META{license} && !ref $META{license};
104 $MM_ARGS{LICENSE} = $META{license}[0]
105 if $META{license} && $eumm_version >= 6.30;
106 $MM_ARGS{NO_MYMETA} = 1
108 $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
109 unless -f 'META.yml';
111 for (qw(configure build test runtime)) {
112 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
113 my $r = $MM_ARGS{$key} = {
114 %{$META{prereqs}{$_}{requires} || {}},
115 %{delete $MM_ARGS{$key} || {}},
117 defined $r->{$_} or delete $r->{$_} for keys %$r;
120 $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
122 delete $MM_ARGS{MIN_PERL_VERSION}
123 if $eumm_version < 6.47_01;
124 $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
125 if $eumm_version < 6.63_03;
126 $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
127 if $eumm_version < 6.55_01;
128 delete $MM_ARGS{CONFIGURE_REQUIRES}
129 if $eumm_version < 6.51_03;
131 ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
132 ## END BOILERPLATE ###########################################################