Matt Sergeant <[EMAIL PROTECTED]> wrote:

> It doesn't seem any different from Error.pm to me, except in syntax. 
> Maybe you could expand on why/where it is different?

OK, yes, it *is* very similar in principle - I would perhaps have been 
better to have added to Graham's code, but I suffer from False Hubris :)

My code coexists better with CGI and, in particular, mod_perl 
(Apache::Registry and Apache::PerlRun) - adding code for HTML output is 
trivial, and I at least attempt to cope with exceptions raised within 
exception handlers and "finally" blocks, but apart from that there are 
minor advantages either way: I prefer my syntax (but then I would :) and 
allow matching of exceptions by regexp against error text and exception 
name as well as class; Error.pm allows try {} to return lists as well as 
scalars (something I may add), has an "otherwise" clause for which I can 
see no particular use at all and I haven't (yet) subclassed Exception.pm 
to provide the sort of functionality Error::IO provides.

The implementations are, of course, significantly different internally; 
which is better I leave up to the reader - I do trap $SIG{__DIE__} which 
many would regard as a hanging offence (but then so does Apache::Debug).

/Pete/ 

Reply via email to