Re: RFC 63 (v1) Exception handling syntax proposal.

[email protected] (Uri Guttman) Tue, 8 Aug 2000 13:31:52 -0400
Newsgroups perl.perl6.language.flow
Message-ID <[email protected].>
>>>>> "PRL" == Perl6 RFC Librarian <[email protected]> writes:

  PRL> =head1 IMPLEMENTATION

  PRL> How this gets translated to live in the core I am not about to
  PRL> say.  <$SIG{__DIE__}> needs to be triggered only as a I<last>
  PRL> resort instead of firing immediately, since it messes with the
  PRL> mind of this and every other decent exception handling mechanism.
  PRL> Perhaps it should be axed altogether.

thanx for posting this. i am proposing the removal of %SIG altogether as
it has lousy semantics. my safe signals RFC proposes a new pragma which
allows signal callbacks and various options. i think a similar one for
die and warning would be useful. something like this:

use die cb => sub{ print "i am dead\n"; exit }, ignore => [ qw( eval try ) ];

the idea is that you can specify where the die handler is active. it the
above example it is not used in eval or catch blocks.

warn can be handled similarly. we already have a warnings pragma.
wouldn't it be nice to be able to specify a callback based on the
warnings you want to handle?

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