This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Better solution to silencing prereq warnings from threads's
authorSteve Peters <steve@fisharerojo.org>
Sat, 21 Oct 2006 13:28:13 +0000 (13:28 +0000)
committerSteve Peters <steve@fisharerojo.org>
Sat, 21 Oct 2006 13:28:13 +0000 (13:28 +0000)
Makefile.PL

p4raw-id: //depot/perl@29069

ext/threads/Makefile.PL

index aeecbde..5cc63d9 100755 (executable)
@@ -61,17 +61,10 @@ if (grep { $_ eq 'PERL_CORE=1' } @ARGV) {
     push(@conditional_params, 'DEFINE' => '-DHAS_PPPORT_H');
 }
 
+my $prereqs;
 
-# Create Makefile
-WriteMakefile(
-    'NAME'              => 'threads',
-    'AUTHOR'            => 'Artur Bergman, Jerry D. Hedden <jdhedden AT cpan DOT org>',
-    'VERSION_FROM'      => 'threads.pm',
-    'ABSTRACT_FROM'     => 'threads.pm',
-    'PM' => {
-        'threads.pm'    => '$(INST_LIBDIR)/threads.pm',
-    },
-    'PREREQ_PM'         => {
+if (!$ENV{PERL_CORE}) {
+    my $prereqs = {
         'strict'          => 0,
         'warnings'        => 0,
         'overload'        => 0,
@@ -80,9 +73,21 @@ WriteMakefile(
         'XSLoader'        => 0,
 
         'ExtUtils::testlib' => 0,
-#        'Hash::Util'        => 0,
-#        'IO::File'          => 0,
+        'Hash::Util'      => 0,
+        'IO::File'        => 0,
+    };
+}
+
+# Create Makefile
+WriteMakefile(
+    'NAME'              => 'threads',
+    'AUTHOR'            => 'Artur Bergman, Jerry D. Hedden <jdhedden AT cpan DOT org>',
+    'VERSION_FROM'      => 'threads.pm',
+    'ABSTRACT_FROM'     => 'threads.pm',
+    'PM' => {
+        'threads.pm'    => '$(INST_LIBDIR)/threads.pm',
     },
+    'PREREQ_PM'         => $prereqs,
     'INSTALLDIRS'       => 'perl',
 
     ((ExtUtils::MakeMaker->VERSION() lt '6.25') ?