I have finally succeeded building XML::Parser on VMS. Note that this is
version 2.29. I have not tried to build 2.30 following Martin Vorlaender's
instructions.
It is interesting to note is that I did not run into touble with binmode()
as David Hansen did. Still, all tests run correctly.
The DCL script follows:
--- 8< ------------------------------
$! 1.   Download XML-Parser-2.29. Version 2.30 does not contain the Expat
parser anymore, and is
$!      consequently harder to build under VMS. Unpack the downloaded file.
This should result in
$!      the creation of the directory XML-PARSER-2_29.
$! 2. Enter the xml-parser directory.
$ sd [.XML-PARSER-2_29]
$! 3.   Make the MMS file
$ perl makefile.pl
$! 4.   Remove superfluous CR characters.
$ perl -pi -e "s/\r$//" [...]*.c [...]*.h [...]*.xs [.EXPAT]TYPEMAP.
$! 5.   Replace too long function names.
$!      On some systems ExtUtils::XSSymSet might be called VMS::XSSymSet.
$!      A series of warnings will indicate which symbols have been trimmed.
$ perl -pi -e "use ExtUtils::XSSymSet; BEGIN{$s = new ExtUtils::XSSymSet}
s/\w{31,}(?=\()/$s->addsym($&)/eg" [...]*.h [...]*.c
$ perl -pi -e "use ExtUtils::XSSymSet; BEGIN{$s = new ExtUtils::XSSymSet}
/^MODULE/ and $p=q[(?<=\s)]; s/$p\w{31,}(?=\()/$s->addsym($&)/eg" [...]*.xs
$! 6.   Fix a bug in [.expat]expat.xs.
$!      This should modify line 993 so that it declares len as unsigned int.
$ perl -pi -e "s/int\s+len;/unsigned $&/ and warn qq{$. : $_}"
[.expat]expat.xs
$! 7.   Replace bad -o options in [.expat]descrip.mms:
$ perl -pi -e "s/,-o,\$\@// and s/$/\/Object=\$\@/" [.expat]descrip.mms
$! 8.   Now build the parser package.
$!      You may want to check that this went all right by looking at
mms.log.
$ mms /output=mms.log
$! 9.   Now install the package and test it:
$ mms install
$ mms test
--- 8< ------------------------------
What has changed is the symbol trimming in the xs-file. I made sure that the
symbols that xsubpp uses to bind to Perl subroutines are not trimmed.

Cheers, Nico.
--
Nico Verwer
[EMAIL PROTECTED]

Reply via email to