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


in reply to How does 'goto LABEL' search for its label?

Do you have a clear definition for "construct"?

from perlglossary

construct As a noun, a piece of syntax made up of smaller pieces.

I think in this context it's supposed to mean "block of a loop".

IMHO this discussion helps: cross scope gotos?

From what I remember labels are only visible from the actual "frame" and parent frames.

Frames are constructs which need an initialization like subs or for-each-loops (remember the aliased loop-var!).

That means you can't jump into these constructs and bypass initialization.

But if you call another sub from within such a frame, that means after run-time initialization, you can goto back.

So lables are a run-time thing. They belong to the dynamic scope like localized vars.

EDIT: I think the deprecation is supposed to disallow jumps into other kinds of loops like while¹ or c-style fors , which have a "logical" but no "physical" initialization like frames.

HTH!

Cheers Rolf

¹) remember that naked blocks are internally just while-loops