File: Makefile.PL

package info (click to toggle)
libregexp-common-perl 2017060201-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster, sid
  • size: 1,324 kB
  • ctags: 229
  • sloc: perl: 17,868; makefile: 2
file content (98 lines) | stat: -rw-r--r-- 3,067 bytes parent folder | download | duplicates (2)
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
#!/usr/bin/perl

use 5.10.0;

use strict;

use ExtUtils::MakeMaker;

my @tests = qw [t/*.t t/*/*.t];

my %args  = (
    NAME                 => 'Regexp::Common',
    VERSION_FROM         => 'lib/Regexp/Common.pm',
    ABSTRACT_FROM        => 'lib/Regexp/Common.pm',
    PREREQ_PM            => {
        'vars'                    => 0,
        'strict'                  => 0,
        'warnings'                => 0,
        'Config'                  => 0,
    },
    MIN_PERL_VERSION     =>  5.010,
    AUTHOR               => 'Abigail <regexp-common@abigail.be>',
    LICENSE              => 'mit',
    META_MERGE           => {
       "meta-spec"       => {version => 2},
        license          => [qw [mit bsd artistic_1 artistic_2]],

        #
        # This section is provided for laughts and giggles only.
        # It seems to be completely and utterly ignored when
        # running "perl Makefile.PL", and extracting the information
        # from PREREQ_PM instead.
        #
        # The result will be that less and less tests will be run,
        # as we're are moving towards using Test::Regexp, which is
        # never going to be a prerequisite to running Regexp::Common.
        #
        prereqs          => {
            configure        => {
                requires         => {
                    'ExtUtils::MakeMaker' => 0,
                    'strict'              => 0,
                    'warnings'            => 0,
                },
            },
            runtime          => {
                requires         => {
                    'vars'                => 0,
                    'strict'              => 0,
                    'warnings'            => 0,
                    'Config'              => 0,
                },
            },
            test             => {
                requires         => {
                    'Test::More'          => 0,
                },
                recommends       => {
                    'Test::Regexp'        => 0,
                },
            },
        },
        resources        => {
            repository   => 'git://github.com/Abigail/Regexp--Common.git',
        },
        keywords         => ['regular expression', 'pattern'],
    },
    test                 => {
        TESTS                => $^O eq 'MSWin32'
                                ? "@{[map {glob} @tests]}" : "@tests"
    },
);


$args {BUILD_REQUIRES}     = $args {PREREQ_PM};
$args {CONFIGURE_REQUIRES} = $args {PREREQ_PM};
$args {TEST_REQUIRES}      = {
                                 %{$args {PREREQ_PM}}, 
                                 "Test::More"  => 0,
                             };


my %filter = (
    MIN_PERL_VERSION     => '6.48',
    META_MERGE           => '6.46',
    AUTHOR               => '6.07',
    ABSTRACT_FROM        => '6.07',
    LICENSE              => '6.07',
);

delete $args {$_} for grep {defined $filter {$_} &&
                            $ExtUtils::MakeMaker::VERSION lt $filter {$_}}
                            keys %args;


WriteMakefile %args;

__END__