avoid needing . in @INC in dev mode
[p5sagit/Sub-Exporter-Progressive.git] / Makefile.PL
CommitLineData
5cf6a81d 1use strict;
67830593 2use warnings;
3
6a204448 4use 5.006;
5cf6a81d 5use ExtUtils::MakeMaker;
fda5874b 6(do './maint/Makefile.PL.include' or die $@) unless -f 'META.yml';
5cf6a81d 7
3ed8308a 8my %BUILD_DEPS = (
9 'Test::More' => '0.88'
cfb0d657 10);
dd634cf0 11
3ed8308a 12my %RUN_DEPS = (
5cf6a81d 13);
3ed8308a 14
15my %META_BITS = (
16 resources => {
17 homepage => 'http://search.cpan.org/dist/Sub-Exporter-Progressive/',
18 repository => 'git://git.shadowcat.co.uk/p5sagit/Sub-Exporter-Progressive.git',
19 bugtracker => 'http://rt.cpan.org/Public/Dist/Display.html?Name=Sub-Exporter-Progressive',
20 },
21 requires => \%RUN_DEPS,
22 dynamic_config => 0,
23);
24
25my $mymeta_works = eval { ExtUtils::MakeMaker->VERSION('6.5707'); 1 };
26my $mymeta = $mymeta_works || eval { ExtUtils::MakeMaker->VERSION('6.5702'); 1 };
27
28my %WriteMakefileArgs = (
2bd70cbd 29 NAME => 'Sub::Exporter::Progressive',
3ed8308a 30 VERSION_FROM => 'lib/Sub/Exporter/Progressive.pm',
31 ABSTRACT_FROM => 'lib/Sub/Exporter/Progressive.pm',
32 LICENSE => 'perl',
33 PREREQ_PM => {
34 %RUN_DEPS,
35 $mymeta_works ? () : (%BUILD_DEPS),
36 },
37
38 $mymeta_works
39 ? ( # BUILD_REQUIRES makes MYMETA right, requires stops META being wrong
40 'BUILD_REQUIRES' => \%BUILD_DEPS,
41 'META_ADD' => {
42 %META_BITS,
43 requires => \%RUN_DEPS,
44 },
45 )
46 : ( # META_ADD both to get META right - only Makefile written
47 'META_ADD' => {
48 %META_BITS,
49 requires => \%RUN_DEPS,
50 build_requires => \%BUILD_DEPS,
51 },
52 )
53 ,
54
55 ($mymeta and !$mymeta_works) ? ( 'NO_MYMETA' => 1 ) : (),
56);
57
58unless ( eval { ExtUtils::MakeMaker->VERSION('6.56') } ) {
59 my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
60 my $pp = $WriteMakefileArgs{PREREQ_PM};
61 for my $mod ( keys %$br ) {
62 if ( exists $pp->{$mod} ) {
63 $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
64 }
65 else {
66 $pp->{$mod} = $br->{$mod};
67 }
68 }
69}
70
71delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
72 unless eval { ExtUtils::MakeMaker->VERSION('6.52') };
73
74WriteMakefile(%WriteMakefileArgs);