Non-shared:

    my ($p, $q);
    try { $p = P->new; $q = Q->new; ... }
    finally { $p and $p->Done; }
    finally { $q and $q->Done; }

Shared:

    try { my $p = P->new; my $q = Q->new; ... }
    finally { $p and $p->Done; }
    finally { $q and $q->Done; }

If P->new throws, then the second finally is going to test
$q, but it's not "in scope" yet (its my hasn't been seen).
Or is it?  If it isn't, I'll take shared lexical scoping out
and put a note about this in ISSUES instead of the current:

    If it is not possible to have try, catch, and finally blocks
    share lexical scope (due, perhaps, to the vagaries of stack
    unwinding), this feature can simply be deleted, and the outer
    scope can be shared.

Yours, &c, Tony Olekshy

Reply via email to