X-Git-Url: http://git.vpit.fr/?p=perl%2Fmodules%2FRegexp-Wildcards.git;a=blobdiff_plain;f=Makefile.PL;h=d5ffb9dc95f3be965a4ddc0308c4888d3b62ffc3;hp=dd135d8b34f94ab461f681a9eb206e3a4183e0e6;hb=b59989cf4ef20a00d992f8b249836e8105602f79;hpb=caa5f3c462570ffc1eb2c4222266978d1c925c3b diff --git a/Makefile.PL b/Makefile.PL index dd135d8..d5ffb9d 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -2,21 +2,36 @@ use strict; use warnings; use ExtUtils::MakeMaker; +my $BUILD_REQUIRES = { + 'ExtUtils::MakeMaker' => 0, + 'Test::More' => 0, +}; + +sub build_req { + my $tometa = ' >> $(DISTVNAME)/META.yml;'; + my $build_req = 'echo "build_requires:" ' . $tometa; + foreach my $mod ( sort { lc $a cmp lc $b } keys %$BUILD_REQUIRES ) { + my $ver = $BUILD_REQUIRES->{$mod}; + $build_req .= sprintf 'echo " %-30s %s" %s', "$mod:", $ver, $tometa; + } + return $build_req; +} + WriteMakefile( - NAME => 'Regexp::Wildcards', - AUTHOR => 'Vincent Pit ', - LICENSE => 'perl', - VERSION_FROM => 'lib/Regexp/Wildcards.pm', - ABSTRACT_FROM => 'lib/Regexp/Wildcards.pm', - PL_FILES => {}, - PREREQ_PM => { + NAME => 'Regexp::Wildcards', + AUTHOR => 'Vincent Pit ', + LICENSE => 'perl', + VERSION_FROM => 'lib/Regexp/Wildcards.pm', + ABSTRACT_FROM => 'lib/Regexp/Wildcards.pm', + PL_FILES => {}, + PREREQ_PM => { 'Exporter' => 0, - 'Test::More' => 0, 'Text::Balanced' => 0, }, - dist => { - PREOP => 'pod2text lib/Regexp/Wildcards.pm > $(DISTVNAME)/README', - COMPRESS => 'gzip -9f', SUFFIX => 'gz' + dist => { + PREOP => 'pod2text lib/Regexp/Wildcards.pm > $(DISTVNAME)/README; ' + . build_req, + COMPRESS => 'gzip -9f', SUFFIX => 'gz' }, - clean => { FILES => 'Regexp-Wildcards-*' }, + clean => { FILES => 'Regexp-Wildcards-*' }, );