add PREREQ_PM to default template (suggested by Michael G Schwern
authorGurusamy Sarathy <gsar@cpan.org>
Sun, 23 Jan 2000 09:24:40 +0000 (09:24 +0000)
committerGurusamy Sarathy <gsar@cpan.org>
Sun, 23 Jan 2000 09:24:40 +0000 (09:24 +0000)
<schwern@pobox.com>)

p4raw-id: //depot/perl@4854

utils/h2xs.PL

index cbeffb4..76e2d65 100644 (file)
@@ -1290,19 +1290,22 @@ EOP
 warn "Writing $ext$modpname/Makefile.PL\n";
 open(PL, ">Makefile.PL") || die "Can't create $ext$modpname/Makefile.PL: $!\n";
 
-print PL <<'END';
+print PL <<END;
 use ExtUtils::MakeMaker;
 # See lib/ExtUtils/MakeMaker.pm for details of how to influence
 # the contents of the Makefile that is written.
+WriteMakefile(
+    'NAME'             => '$module',
+    'VERSION_FROM'     => '$modfname.pm', # finds \$VERSION
+    'PREREQ_PM'                => {}, # e.g., Module::Name => 1.1
 END
-print PL "WriteMakefile(\n";
-print PL "    'NAME'   => '$module',\n";
-print PL "    'VERSION_FROM' => '$modfname.pm', # finds \$VERSION\n"; 
-if( ! $opt_X ){ # print C stuff, unless XS is disabled
+if (!$opt_X) { # print C stuff, unless XS is disabled
   $opt_F = '' unless defined $opt_F;
-  print PL "    'LIBS' => ['$extralibs'],   # e.g., '-lm' \n";
-  print PL "    'DEFINE'       => '$opt_F',     # e.g., '-DHAVE_SOMETHING' \n";
-  print PL "    'INC'  => '',     # e.g., '-I/usr/include/other' \n";
+  print PL <<END;
+    'LIBS'             => ['$extralibs'], # e.g., '-lm'
+    'DEFINE'           => '$opt_F', # e.g., '-DHAVE_SOMETHING'
+    'INC'              => '', # e.g., '-I/usr/include/other'
+END
 }
 print PL ");\n";
 close(PL) || die "Can't close $ext$modpname/Makefile.PL: $!\n";