On Nov 28, 2010, at 1:38 PM, Nicholas Clark wrote:
Can vms/writemain.pl go the way of writemain.SH, and be replaced
with a call
to ExtUtils::Miniperl ?
Looks likely. Thanks for cleaning up our cruft for us. Doing this to
the generated Makefile:
--- descrip.mms;-0 2010-11-25 09:37:05 -0600
+++ descrip.mms 2010-11-28 16:26:38 -0600
@@ -477,7 +477,7 @@ $(DBG)libperlmini$(OLB) : $(mini_obj)
Library/Object/Replace $(MMS$TARGET) $(MMS$SOURCE_LIST)
perlmain.c : miniperlmain.c $(MINIPERL_EXE) [.vms]writemain.pl
- $(MINIPERL) [.vms]Writemain.pl "$(EXT)"
+ $(MINIPERL) -"MExtUtils::Miniperl" -e "writemain(@ARGV)" "$
(EXT)" > perlmain.c
.ifdef __DEBUG__
# Link an extra perl that doesn't invoke the debugger
[end]
gets me a perlmain.c that differs as follows from what we've been
using (but I think the differences are insubstantial):
--- perlmain.old 2010-11-28 16:26:45 -0600
+++ perlmain.c 2010-11-28 16:27:13 -0600
@@ -38,6 +38,7 @@
#include "EXTERN.h"
#define PERL_IN_MINIPERLMAIN_C
#include "perl.h"
+#include "XSUB.h"
static void xs_init (pTHX);
static PerlInterpreter *my_perl;
@@ -152,13 +153,27 @@ main(int argc, char **argv, char **env)
/* Register any extra external extensions */
-/* Do not delete this line--writemain depends on it */
+EXTERN_C void boot_DynaLoader (pTHX_ CV* cv);
static void
xs_init(pTHX)
{
- char *file = __FILE__;
-extern void boot_DynaLoader (pTHX_ CV* cv);
- dXSUB_SYS;
- newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);
+ const char file[] = __FILE__;
+ dXSUB_SYS;
+ PERL_UNUSED_CONTEXT;
+ {
+ /* DynaLoader is a special case */
+
+ newXS("DynaLoader::boot_DynaLoader", boot_DynaLoader, file);
+ }
}
+
+/*
+ * Local variables:
+ * c-indentation-style: bsd
+ * c-basic-offset: 4
+ * indent-tabs-mode: t
+ * End:
+ *
+ * ex: set ts=8 sts=4 sw=4 noet:
+ */
[end]
It compiles. I need to do a full build and test but it looks like
this is a job we can export to ExtUtils::Miniperl.
________________________________________
Craig A. Berry
mailto:craigbe...@mac.com
"... getting out of a sonnet is much more
difficult than getting in."
Brad Leithauser