I "cheated" in my RFC by referring to an external document that said what I 
wanted to say, but I am prepared to write up the whole thing as soon as we 
decide upon any deviation from the Error.pm syntax/semantics.

One thing I would desperately like to see is Perl's internal exceptions 
(everything it currently dies on) put into exception classes.  Then you can 
wrap a large chunk of code in a try{} block and test the exception without 
having to play hopscotch with regexen and hope that the message doesn't 
change in the next release.

Loath as I am to say it, perhaps we could look to Java for the way to break 
these exceptions into classes.

The exception should look the same as it does now if it isn't caught, and 
one of the beauties of Error.pm is that this happens transparently, e.g., 
open() could say:

    ...
    throw Exception::IO (-text => $!) unless sysopen...
    ...

and then if someone catches it, they can see the error is in the 
Exception::IO class, and if they don't, it'll still die "permission denied" 
or whatever.

--
Peter Scott
Pacific Systems Design Technologies

Reply via email to