2 use warnings FATAL => 'all';
9 configure => { requires => {
10 'ExtUtils::MakeMaker' => 0,
12 build => { requires => {
14 test => { requires => {
15 'Test::More' => '0.88',
17 runtime => { requires => {
18 'ExtUtils::MakeMaker' => 0,
20 'File::Basename' => 0,
22 develop => { requires => {
28 url => 'https://github.com/p5sagit/Distar.git',
29 web => 'https://github.com/p5sagit/Distar',
32 x_IRC => 'irc://irc.perl.org/#toolchain',
34 web => 'https://github.com/p5sagit/Distar/issues',
36 license => [ 'https://dev.perl.org/licenses/' ],
39 directory => [ 't', 'xt' ]
41 x_authority => 'cpan:MSTROUT',
46 ## BOILERPLATE ###############################################################
47 require ExtUtils::MakeMaker;
48 (do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
50 # have to do this since old EUMM dev releases miss the eval $VERSION line
51 my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
52 my $mymeta = $eumm_version >= 6.57_02;
53 my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
55 ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
56 ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
57 $META{license} = [ $META{license} ]
58 if $META{license} && !ref $META{license};
59 $MM_ARGS{LICENSE} = $META{license}[0]
60 if $META{license} && $eumm_version >= 6.30;
61 $MM_ARGS{NO_MYMETA} = 1
63 $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
65 $MM_ARGS{PL_FILES} ||= {};
66 $MM_ARGS{NORECURS} = 1
67 if not exists $MM_ARGS{NORECURS};
69 for (qw(configure build test runtime)) {
70 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
71 my $r = $MM_ARGS{$key} = {
72 %{$META{prereqs}{$_}{requires} || {}},
73 %{delete $MM_ARGS{$key} || {}},
75 defined $r->{$_} or delete $r->{$_} for keys %$r;
78 $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
80 delete $MM_ARGS{MIN_PERL_VERSION}
81 if $eumm_version < 6.47_01;
82 $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
83 if $eumm_version < 6.63_03;
84 $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
85 if $eumm_version < 6.55_01;
86 delete $MM_ARGS{CONFIGURE_REQUIRES}
87 if $eumm_version < 6.51_03;
89 ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
90 ## END BOILERPLATE ###########################################################