2 use warnings FATAL => 'all';
9 configure => { requires => {
10 'ExtUtils::MakeMaker' => 0,
14 'Test::More' => '0.47',
25 url => 'git://git.shadowcat.co.uk/gitmo/Class-C3-XS.git',
26 web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo/Class-C3-XS.git',
30 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Class-C3-XS',
31 mailto => 'bug-Class-C3-XS@rt.cpan.org',
33 homepage => 'https://metacpan.org/release/Class-C3-XS',
34 license => [ 'http://dev.perl.org/licenses/' ],
37 directory => [ 't', 'xt' ]
43 ## BOILERPLATE ###############################################################
44 require ExtUtils::MakeMaker;
45 (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
47 # have to do this since old EUMM dev releases miss the eval $VERSION line
48 my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
49 my $mymeta = $eumm_version >= 6.57_02;
50 my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
52 ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
53 ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
54 $META{license} = [ $META{license} ]
55 if $META{license} && !ref $META{license};
56 $MM_ARGS{LICENSE} = $META{license}[0]
57 if $META{license} && $eumm_version >= 6.30;
58 $MM_ARGS{NO_MYMETA} = 1
60 $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
63 for (qw(configure build test runtime)) {
64 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
65 my $r = $MM_ARGS{$key} = {
66 %{$META{prereqs}{$_}{requires} || {}},
67 %{delete $MM_ARGS{$key} || {}},
69 defined $r->{$_} or delete $r->{$_} for keys %$r;
72 $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
74 delete $MM_ARGS{MIN_PERL_VERSION}
75 if $eumm_version < 6.47_01;
76 $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
77 if $eumm_version < 6.63_03;
78 $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
79 if $eumm_version < 6.55_01;
80 delete $MM_ARGS{CONFIGURE_REQUIRES}
81 if $eumm_version < 6.51_03;
83 ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
84 ## END BOILERPLATE ###########################################################