add begin.t from Method::Signatures
[p5sagit/Function-Parameters.git] / Makefile.PL
1 use strict;
2 use warnings;
3 use ExtUtils::MakeMaker;
4
5 sub merge_key_into {
6         my ($href, $target, $source) = @_;
7         %{$href->{$target}} = (%{$href->{$target}}, %{delete $href->{$source}});
8 }
9
10 my %opt = (
11         NAME          => 'Function::Parameters',
12         AUTHOR        => q{Lukas Mai <l.mai@web.de>},
13         VERSION_FROM  => 'lib/Function/Parameters.pm',
14         ABSTRACT_FROM => 'lib/Function/Parameters.pm',
15
16         LICENSE => 'perl',
17         PL_FILES => {},
18
19         MIN_PERL_VERSION => '5.14.0',
20         CONFIGURE_REQUIRES => {
21                 'strict' => 0,
22                 'warnings' => 0,
23                 'ExtUtils::MakeMaker' => '6.48',
24         },
25         BUILD_REQUIRES => {},
26         TEST_REQUIRES => {
27                 'constant' => 0,
28                 'strict' => 0,
29                 'utf8' => 0,
30                 'Dir::Self' => 0,
31                 'Test::More' => 0,
32                 'Test::Fatal' => 0,
33         },
34         PREREQ_PM => {
35                 'Carp' => 0,
36                 'XSLoader' => 0,
37                 'warnings' => 0,
38         },
39
40         depend => { Makefile => '$(VERSION_FROM)' },
41         test   => { TESTS    => 't/*.t t/foreign/*.t t/foreign/*/*.t' },
42         dist   => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
43         clean  => { FILES    => 'Function-Parameters-*' },
44
45         META_MERGE => {
46                 'meta-spec' => { version => 2 },
47                 resources => {
48                         repository => {
49                                 url => 'git://github.com/mauke/Function-Parameters',
50                                 web => 'https://github.com/mauke//Function-Parameters',
51                                 type => 'git',
52                         },
53                 },
54         },
55 );
56
57 (my $mm_version = ExtUtils::MakeMaker->VERSION) =~ tr/_//d;
58
59 if ($mm_version < 6.67_04) {
60         # Why? For the glory of satan, of course!
61         no warnings qw(redefine);
62         *ExtUtils::MM_Any::_add_requirements_to_meta_v1_4 = \&ExtUtils::MM_Any::_add_requirements_to_meta_v2;
63 }
64
65 if ($mm_version < 6.63_03) {
66         merge_key_into \%opt, 'BUILD_REQUIRES', 'TEST_REQUIRES';
67 }
68
69 if ($mm_version < 6.55_01) {
70         merge_key_into \%opt, 'CONFIGURE_REQUIRES', 'BUILD_REQUIRES';
71 }
72
73 if ($mm_version < 6.51_03) {
74         merge_key_into \%opt, 'PREREQ_PM', 'CONFIGURE_REQUIRES';
75 }
76
77 WriteMakefile %opt;