develooper Front page | perl.perl5.porters | Postings from June 2021

Re: RFC 0004 - defer {} syntax

Thread Previous | Thread Next
Eirik Berg Hanssen
June 21, 2021 02:17
Re: RFC 0004 - defer {} syntax
Message ID:
On Mon, Jun 21, 2021 at 3:37 AM Ben Bullock <>

> I went back and checked, and I've actually said this in all of the
> messages I've sent on this thread, and so far nobody has pointed out the
> mistake in my understanding. Is there some way of sneaking out of if{}
> without arriving at the end of the code?

  Yes?  Plenty of ways: An exception may sneak out (all the way to the
first dynamically enclosing eval or similar); a return may sneak out (all
the way out of the subroutine call); a next/last/redo may sneak out (all
the way out of the first dynamically enclosing loop with matching label, if
given); a goto LABEL may sneak out to some arbitrary LABEL.

  And those evals, subroutine calls, and loops may nest in any order.
There's no one obvious outer context, like there's an obvious enclosing


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