>>>>> "SC" == Simon Cozens <[EMAIL PROTECTED]> writes:
SC> On Mon, Sep 25, 2000 at 03:10:47PM -0400, Uri Guttman wrote:
>> in what order? like BEGIN and END?
SC> Whatever, yes.
>> what if you wanted a block scoped warn handler?
SC> What about it? (Or did someone eat the "local" keyword already?)
well, if you have a sub thingy (what do you call a BEGIN type sub? i
know there is an rfc to amke it a real sub) WARN, then how would you use
local on it? that was my point. the syntax you proposed doesn't fit
there, hence my counter proposal for a pragma.
>> i think it would be better to have some explicit way of
>> setting the handlers at runtime (better than %SIG) to give more
>> control.
SC> Are you talking about signals or warn/die now?
well, the current %SIG merges the two. my safe signals pragma could
support both or the use warnings pragma could support warn and die
handlers. but the %SIG mechanism is too weak as it only lets you pass a
code ref. it needs some sort of key/value api to pass in other arguments
like the warnings to enable, object level callbacks, etc.
uri
--
Uri Guttman --------- [EMAIL PROTECTED] ---------- http://www.sysarch.com
SYStems ARCHitecture, Software Engineering, Perl, Internet, UNIX Consulting
The Perl Books Page ----------- http://www.sysarch.com/cgi-bin/perl_books
The Best Search Engine on the Net ---------- http://www.northernlight.com