Skip to content

Need docs demonstrating how to replace 'goto LABEL' #23803

@jkeenan

Description

@jkeenan

As part of my research on Fatalization of currently deprecated goto
construct
I have been
re-reading our current documentation of goto in blead and have been trying
to locate in our test suite examples of each claim made in that documentation.
What we find -- or fail to find -- there will have an impact on the
documentation updates provided as part of a pull request like the current
#23782. I've posted the preliminary results
of that documentation review
here.
This is the first in a series of GH issues addressing the items which I
believe are lacking in that documentation.

perldoc -f goto states that goto:

can be used to go almost anywhere else within the dynamic scope,
including out of subroutines, but it's usually better to use
some other construct such as "last" or "die".

Can this value judgment be illustrated via tests in the Perl 5 test suite?
(So far I have not been able to locate any.)

Such examples would be very helpful in repairing any damage to CPAN
libraries that occur as part of a fatalization of certain aspects of goto LABEL.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions