2 use warnings FATAL => 'all';
5 use ExtUtils::HasCompiler qw(can_compile_loadable_object);
11 configure => { requires => {
12 'ExtUtils::MakeMaker' => 0,
14 build => { requires => {
18 'Test::More' => '0.47',
23 'Algorithm::C3' => '0.07',
24 'Scalar::Util' => '0',
29 requires => { map { $_ => 0 } qw(
30 indirect multidimensional bareword::filehandles
31 Moose Mouse namespace::clean namespace::autoclean
32 MooseX::Types::Common::Numeric
39 url => 'git://git.shadowcat.co.uk/gitmo/Class-C3.git',
40 web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo/Class-C3.git',
44 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Class-C3',
45 mailto => 'bug-Class-C3@rt.cpan.org',
47 homepage => 'https://metacpan.org/release/Class-C3',
48 license => [ 'http://dev.perl.org/licenses/' ],
51 directory => [ 't', 'xt', 'opt', 'inc' ]
57 ( $] < 5.009_005 and is_smoker() )
58 ? ( 'Devel::Hide' => 0 ) : ()
61 ( $] < 5.009_005 and can_compile_loadable_object(quiet => 1) )
62 ? ( 'Class::C3::XS' => '0.13' ) : ()
67 return ( $ENV{AUTOMATED_TESTING} && ! $ENV{PERL5_CPANM_IS_RUNNING} && ! $ENV{RELEASE_TESTING} )
70 ## BOILERPLATE ###############################################################
71 require ExtUtils::MakeMaker;
72 (do 'maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
74 # have to do this since old EUMM dev releases miss the eval $VERSION line
75 my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
76 my $mymeta = $eumm_version >= 6.57_02;
77 my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
79 ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
80 ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
81 $META{license} = [ $META{license} ]
82 if $META{license} && !ref $META{license};
83 $MM_ARGS{LICENSE} = $META{license}[0]
84 if $META{license} && $eumm_version >= 6.30;
85 $MM_ARGS{NO_MYMETA} = 1
87 $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
90 for (qw(configure build test runtime)) {
91 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
92 my $r = $MM_ARGS{$key} = {
93 %{$META{prereqs}{$_}{requires} || {}},
94 %{delete $MM_ARGS{$key} || {}},
96 defined $r->{$_} or delete $r->{$_} for keys %$r;
99 $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
101 delete $MM_ARGS{MIN_PERL_VERSION}
102 if $eumm_version < 6.47_01;
103 $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
104 if $eumm_version < 6.63_03;
105 $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
106 if $eumm_version < 6.55_01;
107 delete $MM_ARGS{CONFIGURE_REQUIRES}
108 if $eumm_version < 6.51_03;
110 ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
111 ## END BOILERPLATE ###########################################################