http://www.perlmonks.org?node_id=1013834


in reply to Re: How does 'goto LABEL' search for its label? (call stack)
in thread How does 'goto LABEL' search for its label?

Thanks tye, your reply did clear up a few things.

I had two problems with my mental model. I didn't remember that that if (0) { } gets optimized away. I also wrongly assumed that each block produces a stack frame.

As for there being a new warning for "if(1){X:...} goto X:", I lack the details for why this got deprecated.

I didn't find many details either, just that without it, the implementation of lexpads would be much simpler and saner.

Now I must go back and study the crufty error handling code I inherited, and see if it can be rescued (or if I can safely argue that it must be rewritten to use something saner).