On Thu, Aug 10, 2000 at 05:11:17PM +0100, Graham Barr wrote:
> I was more thinking of
>
> eval {
> # fragile code
> }
> else { # catch ALL exceptions
> switch ($@) {
> case __->isa('IO') { ... }
> case __->isa('Socket') { ... }
> else { ... }
> }
> }
> continue {
> # code always executed (ie finally)
> }
I like it.
BTW, that switch could be written like this:
switch ($@->isa(^_)) {
case 'IO' { ... }
case 'Socket' { ... }
... # else code
}
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]
- Re: RFC 80 (v1): Exception objects and cl... Chaim Frenkel
- Re: RFC 80 (v1): Exception objects an... Graham Barr
- Re: RFC 80 (v1): Exception objects and cl... Peter Scott
- Re: RFC 80 (v1): Exception objects an... Jeremy Howard
- Re: RFC 80 (v1): Exception objects an... Graham Barr
- Re: RFC 80 (v1): Exception objec... John Porter
- Re: RFC 80 (v1): Exception o... Graham Barr
- Re: RFC 80 (v1): Exception o... John Porter
- Re: RFC 80 (v1): Exception o... Peter Scott
- Re: RFC 80 (v1): Exception o... Graham Barr
- Re: RFC 80 (v1): Exception objects and classes fo... Jonathan Scott Duff
- Re: RFC 80 (v1): Exception objects and classes for bui... Tony Olekshy
