RE: catching warnings

2002-01-21 Thread David Whipp
In light of Apo4, I thought I'd re-ask this question. Is the following still the approved idiom, or will we have a nice little /[A-Z]+/ thingie: sub foo { temp $SIG{__WARN__} = sub { warn "$(timestamp) $@\n" } warn "hello" } Dave. -- Dave Whipp, Senior Verification Engineer, Fast-Chip

RE: catching warnings

2002-01-08 Thread Sterin, Ilya
Or possibly a universal catch, with the $@.warning and $@.die or something, so that you can check it. Ilya > -Original Message- > From: David Whipp [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, January 08, 2002 7:25 PM > To: Perl6-Language (E-mail) > Subject: ca

catching warnings

2002-01-08 Thread David Whipp
Perl6 is going to introduce a non-resumable throw/catch mechanism to replace die/$@. (I assume that die will be synonymous with throw, for compatibility.) But what about warnings? I frequently find myself wanting to "catch" warnings (e.g. to add extra context around a library's "use of undefined