2 use warnings FATAL => 'all';
5 name => 'Package-Variant',
7 test => { requires => {
10 runtime => { requires => {
12 'strictures' => '2.000000',
14 'Import::Into' => '1.000000',
15 'Module::Runtime' => '0.013',
20 # r/w: p5sagit@git.shadowcat.co.uk:Package-Variant.git
22 url => 'git://git.shadowcat.co.uk/p5sagit/Package-Variant.git',
23 web => 'http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=p5sagit/Package-Variant.git',
27 mailto => 'bug-Package-Variant@rt.cpan.org',
28 web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Package-Variant',
31 no_index => { directory => [ 't', 'xt', ], package => [ 'string' ] },
36 ## BOILERPLATE ###############################################################
37 require ExtUtils::MakeMaker;
38 (do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
40 # have to do this since old EUMM dev releases miss the eval $VERSION line
41 my $eumm_version = eval $ExtUtils::MakeMaker::VERSION;
42 my $mymeta = $eumm_version >= 6.57_02;
43 my $mymeta_broken = $mymeta && $eumm_version < 6.57_07;
45 ($MM_ARGS{NAME} = $META{name}) =~ s/-/::/g;
46 ($MM_ARGS{VERSION_FROM} = "lib/$MM_ARGS{NAME}.pm") =~ s{::}{/}g;
47 $META{license} = [ $META{license} ]
48 if $META{license} && !ref $META{license};
49 $MM_ARGS{LICENSE} = $META{license}[0]
50 if $META{license} && $eumm_version >= 6.30;
51 $MM_ARGS{NO_MYMETA} = 1
53 $MM_ARGS{META_ADD} = { 'meta-spec' => { version => 2 }, %META }
56 for (qw(configure build test runtime)) {
57 my $key = $_ eq 'runtime' ? 'PREREQ_PM' : uc $_.'_REQUIRES';
58 my $r = $MM_ARGS{$key} = {
59 %{$META{prereqs}{$_}{requires} || {}},
60 %{delete $MM_ARGS{$key} || {}},
62 defined $r->{$_} or delete $r->{$_} for keys %$r;
65 $MM_ARGS{MIN_PERL_VERSION} = delete $MM_ARGS{PREREQ_PM}{perl} || 0;
67 delete $MM_ARGS{MIN_PERL_VERSION}
68 if $eumm_version < 6.47_01;
69 $MM_ARGS{BUILD_REQUIRES} = {%{$MM_ARGS{BUILD_REQUIRES}}, %{delete $MM_ARGS{TEST_REQUIRES}}}
70 if $eumm_version < 6.63_03;
71 $MM_ARGS{PREREQ_PM} = {%{$MM_ARGS{PREREQ_PM}}, %{delete $MM_ARGS{BUILD_REQUIRES}}}
72 if $eumm_version < 6.55_01;
73 delete $MM_ARGS{CONFIGURE_REQUIRES}
74 if $eumm_version < 6.51_03;
76 ExtUtils::MakeMaker::WriteMakefile(%MM_ARGS);
77 ## END BOILERPLATE ###########################################################