[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]

[PATCH utils/h2xs.PL 5.005_63] Putting PREREQ_PM in the Makefile.PL template



Since CPAN.pm can now automatically install dependency modules if
they're declared in Makefile.PL via PREREQ_PM I figure it would be
nice if h2xs stuck it in its Makefile.PL template.

I also cleaned up the alignment of the WriteMakefile hash a bit.



--- utils/h2xs.PL     2000/01/21 19:54:09
+++ utils/h2xs.PL     2000/01/21 19:54:33
@@ -1292,13 +1292,14 @@
 # the contents of the Makefile that is written.
 END
 print PL "WriteMakefile(\n";
-print PL "    'NAME'   => '$module',\n";
-print PL "    'VERSION_FROM' => '$modfname.pm', # finds \$VERSION\n";
+print PL "    'NAME'          => '$module',\n";
+print PL "    'VERSION_FROM'  => '$modfname.pm', # finds \$VERSION\n";
+print PL "    'PREREQ_PM'     => {   }, # e.g., Module::Name => 1.1\n";
 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 "    '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 ");\n";
 close(PL) || die "Can't close $ext$modpname/Makefile.PL: $!\n";

-- 

Michael G Schwern                                           schwern@pobox.com
                    http://www.pobox.com/~schwern
     /(?:(?:(1)[.-]?)?\(?(\d{3})\)?[.-]?)?(\d{3})[.-]?(\d{4})(x\d+)?/i


[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index][Thread Index][Top&Search][Original]