"David Starks-Browning" <[EMAIL PROTECTED]> writes:
> On 5 Oct 01, Jason E. Stewart writes:
> > * the code that uses cerr doesn't need to be there at all, but because
> > of the current exception handling mechanism I use (which is not
> > optimal), I catch unhandled exceptions with cerr. This is slated to
> > change in 1.5.8
>
> I would be very interested to try this version ASAP. If I don't need
> libstdc++, then perhaps I don't need to coerce perl to use ld=gcc on
> Digital. (Not a single hit on perl5-porters matching "alpha-dec_osf"
> and "ld='gcc'"! I don't think it's ever been done! That would
> explain why I haven't succeeded yet...)
Hmmm... What a pain.
> I can attempt to get xml-xerces/perl from cvs.apache.org if that would
> be helpful before you release 1.5.8.
First the bad news:
I'd love to do this, but I haven't even released 1.5.7 yet. I only have
pieces of 1.5.7 committed to CVS.
What needs to happen for 1.5.8 is that I need to create a *proper*
exception handling mechanism in XML::Xerces. Currently all parse
exceptions are caught by the standard ErrorHandler mechanism:
$handler = MyErrorHandler->new();
$parser->setErrorHandler($handler);
$parser->parse(); # an error here calls MyErrorHandler::error()
Problem is Parser::parse() can also throw XMLExceptions which are not
handled by this mechanism. Since most people don't care about those, I
hacked together a silly mechanism to catch them and exit printing out
the error. After reading the mod_perl FAQ I learned how I *should*
really be doing things, and it is much better, and it is the accepted
Perl way to do things.
This will require quite a bit of changes, none major, but many files
will be affected.
Now the good news:
I shouldn't be using cerr at all. For now the simplest thing to do is
change all occurrences of:
cerr << "Some text" << endl;
exit();
Should be changed to:
croak("%s", "some text");
And the need for libstdc++ goes away. This should be very easy for me
to fix. I will work on these changes over the weekend and when I
commit them to CVS, I'll email the list.
Thanks for helping out!
jas.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]