[Melbourne-pm] XML::Xerces

Malcolm Herbert melbourne-pm at mjch.net
Sun Sep 10 17:18:34 PDT 2006


Over the weekend I had another look at getting XML::Xerces running on 
this Solaris machine.  I went back to using gcc to compile both the
xerces-c library and the SWIG wrapper for it and again came across the
missing requirement for -lCrun at link time.

After poking around a bit I discovered that libCrun is only used by
the Sun compiler and was not used by gcc at all ... so, after a small
Makefile edit I was able to cleanly compile the C++ portion of 
XML::Xerces and begin testing ... 

Unfortunately I haven't managed to get it to pass the bundled tests yet.

It seems that any time the xerces-c library needs to raise an exception
triggered by bad input (as tested for in the test suite) it will throw
an exception that the Perl portion of the code doesn't catch properly
and dies with a fatal error.  For example:

|t/DOMDocument.............1..11
|ok 1 - module loaded
|ok 2 - importing a child from a different document
|terminate called after throwing an instance of 'xercesc_2_7::DOMException'
|dubious
|        Test returned status 0 (wstat 134, 0x86)
|DIED. FAILED tests 3-11
|        Failed 9/11 tests, 18.18% okay

The code which produces the above fatal error looks like:

|# check that creating an element with an illegal charater
|eval {
|  my $el = $doc1->createElement('?');
|};
|my $error = $@;
|ok($error,'creating document with illegal raises exception');

I went through the test suite and commented out instances of these errors
to make sure that any following tests which might still pass were run, 
however there weren't many ...

-- 
Malcolm Herbert                                This brain intentionally
mjch at mjch.net                                                left blank


More information about the Melbourne-pm mailing list