summaryrefslogtreecommitdiff
path: root/Makefile.PL
blob: 92024c89d4fe84d7490e6510e9e7d5175719379f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
use 5.008;
use ExtUtils::MakeMaker;

my $file = 'lib/ex/monkeypatched.pm';
my %data = (
    NAME                  => 'ex::monkeypatched',
    LICENSE               => 'perl',
    MIN_PERL_VERSION      => '5.008',
    META_MERGE            => {
        resources         => {
            repository    => 'https://github.com/arc/p5-ex-monkeypatched',
        },
    },
    VERSION_FROM          => $file,
    ABSTRACT_FROM         => $file,
    AUTHOR                => 'Aaron Crane <arc@cpan.org>',
    BUILD_REQUIRES        => {
        'Test::More'      => '0.88',
        'Test::Exception' => 0,
    },
    PREREQ_PM             => {
        'Sub::Name'       => 0,
    },
);

for ($ExtUtils::MakeMaker::VERSION) {
    delete $data{MIN_PERL_VERSION} if $_ < 6.48;
    delete $data{META_MERGE}       if $_ < 6.46;
    delete $data{LICENSE}          if $_ < 6.31;
    $data{PREREQ_PM} = { %{ $data{PREREQ_PM} }, %{ delete $data{BUILD_REQUIRES} } }
                                   if $_ < 6.5503;
}

WriteMakefile(%data);