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]

Reply via email to