]> git.vpit.fr Git - perl/modules/Regexp-Wildcards.git/blobdiff - Makefile.PL
Importing Regexp-Wildcards-0.08.tar.gz
[perl/modules/Regexp-Wildcards.git] / Makefile.PL
index dd135d8b34f94ab461f681a9eb206e3a4183e0e6..d5ffb9dc95f3be965a4ddc0308c4888d3b62ffc3 100644 (file)
@@ -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 <perl@profvince.com>',
-    LICENSE             => 'perl',
-    VERSION_FROM        => 'lib/Regexp/Wildcards.pm',
-    ABSTRACT_FROM       => 'lib/Regexp/Wildcards.pm',
-    PL_FILES            => {},
-    PREREQ_PM           => {
+    NAME          => 'Regexp::Wildcards',
+    AUTHOR        => 'Vincent Pit <perl@profvince.com>',
+    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-*' },
 );