develooper Front page | perl.perl5.porters | Postings from January 2022

Re: Pre-RFC: try/catch/finally and generic finally blocks

Thread Previous | Thread Next
David Nicol
January 19, 2022 19:47
Re: Pre-RFC: try/catch/finally and generic finally blocks
Message ID:
On Wed, Jan 19, 2022 at 5:48 AM Paul "LeoNerd" Evans <>

> next/last/redo all act the same way, so I didn't add three tests for
> each on the hope that the `last` one is sufficient for them all.

My expectations of what next/last/redo would do in a finally block are as

   - last jumps to the end of the finally block
   - redo starts the finally block over (not the exception handler, but you
   should be able to get there with goto label)
   - next jumps to the test for the outer interator, if any, as if it was
   stated outside of the construct. Why is next even an issue in
   try/catch/finally? it isn't an interator.

or does "act the same way" just have to do with scope cleanup, and "the
same way" means "no change to how they act" ?

"Lay off that whiskey, and let that cocaine be!" -- Johnny Cash

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About