Skip to content

Conversation

@wolfsage
Copy link
Contributor

There are many cases where we throw exceptions if you attempt to goto somewhere you have no business going. We'd also throw a deprecation warning in these cases, which just seems silly. Deprecated means "this will stop working eventually", so there's no need to throw that when we're just going to die right now.

This probably warrants a changelog entry.

IMO, this could (should) be merged, and then #23782 could be built on this, changing the deprecate_fatal_in to a DIE() to match the other goto exceptions...

@wolfsage wolfsage requested review from jkeenan and tonycoz November 14, 2025 23:16
There are many cases where we throw exceptions if you attempt to goto
somewhere you have no business going. We'd *also* throw a deprecation
warning in these cases, which just seems silly. Deprecated means "this
will stop working eventually", so there's no need to throw that when
we're just going to die right now.
@jkeenan
Copy link
Contributor

jkeenan commented Nov 15, 2025

There are many cases where we throw exceptions if you attempt to goto somewhere you have no business going. We'd also throw a deprecation warning in these cases, which just seems silly. Deprecated means "this will stop working eventually", so there's no need to throw that when we're just going to die right now.

This probably warrants a changelog entry.

IMO, this could (should) be merged, and then #23782 could be built on this, changing the deprecate_fatal_in to a DIE() to match the other goto exceptions...

Thanks for taking a look at this. I hope to get to this Sunday or early next week.

jkeenan added a commit to jkeenan/perl5 that referenced this pull request Nov 15, 2025
This branch explores the question:  What if we accept Matt Horsfall's
suggested revision in pp_ctl.c (GH Perl#23922) into blead, then accept the
goto-label-fatal branch underlying p.r. GH Perl#23782 into blead?

Once a couple of merge conflicts were revised, the result would
configure and build but would fail two test files:

  op/goto.t   (Wstat: 0 Tests: 75 Failed: 23)
    Failed tests:  53-75
  uni/labels.t (Wstat: 0 Tests: 11 Failed: 1)
    Failed test:  10

The failures in t/op/goto.t would be not at all surprising.  Those tests
are tests which currently pass in blead but which would fail if the code
changes in pp_ctl.c in 23782 were directly merged into blead.  I first
deleted those tests from t/op/goto.t, then added them back in so that we
would have a tally of the ways in which 'goto LABEL' would *no longer*
work.  So if we first merged 23922, we would presumably re-work those 23
test to pass in an informative way.

I'll need to look further into t/uni/labels.t.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants