|Keep It Simple, Stupid|
Re (tilly) 5: Supersplitby tilly (Archbishop)
|on Jan 07, 2001 at 23:30 UTC||Need Help??|
Sorry about taking so long to get back on this. The discussion is rather long and energy is limited.
First of all CGI is a poor example. It is used in a large number of environments and there is no well-defined way to report an error. That makes reporting errors hard. (Indeed the lack of a universal way to report errors in CGI scripts is one of the reasons why the web is such a painful application platform.)
LWP I would need to look at in more detail. But note that with older versions of Carp the reliance on inheritance was seriously buggy. So even if someone wanted to use the kind of behaviour I defined it was unusable. But the beginning hack that direction goes back quite a few years. I don't know what was originally intended, but it has incorporated (admittedly only half-way) those ideas since at least 5.003.
But I do have a big disagreement with you, which probably has a lot to do with the different kinds of things we do. I do a lot of batch-processing. There you almost always want to do all of your work in some temporary area, and then when it is all done roll it into production areas. In essence you open a "transaction", do your work, and then "commit" it.
In that environment you want virtually every error to be fatal. If anything went wrong in processing, don't mess up your production data. Instead die a horrible flaming (but informative) death and leave your current state lying in place so that in the morning a test case can be quickly constructed without redoing an hour or two of processing.
Therefore I issue few non-fatal warnings. Instead I terminate with prejudice.
Now your example of a BEGIN issue with circular requires bugs me. If you start using circular inheritance in Perl you will get a lot of problems very, very fast. That is a Don't do that. You are asking for trouble. Therefore rather than trying to figure out how to dodge a few bullets I would suggest rethinking your design to not want to be doing something so inherently fraught with risk.
Without seeing specific examples of what else is supposed to be wrong, I don't know whether to discount them as well. But considering that I have never been bitten, and I am not seeing examples which would bite me, I will continue to be unconvinced on that issue.
YMMV. (And in fact apparently does.)