Fatalization of goto to jump into a construct: Phase 1 #23677
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is the first in a series of projected pull requests described in #23618 (comment). This p.r. addresses most items in the bullet point Preliminary code changes in the Perl guts in that comment. This p.r. is for research and discussion purposes, will start off in Draft status and will be labeled
do not merge
.This p.r. does the following:
Changes exactly one statement in the Perl guts: In
pp_ctl.c
, changes the warning about the scheduled fatalization ofUse of goto to jump into a construct
to an exception implementing that fatalization.Creates an item in
pod/perldiag.pod
for that exception's message. However, the full explanation for the exception and how to work around it has not yet been written. (Anyone want to take that on as a separate pull request?) Creating the item at least helpsmake test_porting
to PASS.Adapts test files other than the 3 files matching
t/goto*.t
to avoid or accommodate the now fatalized flavor ofgoto
. Those test files are:In
t/porting/deprecation.t
, I've simply commented-out some test blocks for now rather than removing them completely. We need to figure out whether those blocks were entirely focused on this particular deprecation or whether we were using them as exemplars of testing deprecation warnings more generally.t/porting/goto.t
: Temporarily turns this test file off. If it were left on, it would have massive failures. We need multiple eyeballs on the code here so that we have a better understanding of how goto needs to be tested. We'll be better positioned to do this in a subsequent pull request.