Skip to content

Conversation

jkeenan
Copy link
Contributor

@jkeenan jkeenan commented Aug 29, 2025

This pull request consolidates into a new test file all tests formerly found in t/op/goto.t that exercise the goto &NAME functionality. These should be outside the scope of the current (5.42) deprecation of aspects of goto LABEL (GH #23618) now scheduled for 5.44. If we have done that successfully, then during the 5.43 dev cycle we shouldn't see any instances of this warning (or of its fatalization replacement).


  • This set of changes does not require a perldelta entry.

@jkeenan jkeenan requested review from mauke and tonycoz August 29, 2025 22:29
@jkeenan jkeenan changed the title Smoke me/jkeenan/t op goto split 20250829 t/op/goto.t: Split into two files, one focused on 'goto &NAME' Aug 30, 2025
@tonycoz
Copy link
Contributor

tonycoz commented Sep 1, 2025

This test left in op/goto.t is a goto sub test:

sub TIESCALAR { bless [pop] }
sub FETCH     { $_[0][0] }
tie my $t, "", sub { "cluck up porridge" };
is eval { sub { goto $t }->() }//$@, 'cluck up porridge',
  'tied arg returning sub ref';

I agree that goto-sub.t would be a better name.

@jkeenan jkeenan force-pushed the smoke-me/jkeenan/t-op-goto-split-20250829 branch from 02c9876 to e49ddef Compare September 1, 2025 01:35
@jkeenan
Copy link
Contributor Author

jkeenan commented Sep 1, 2025

This test left in op/goto.t is a goto sub test:

sub TIESCALAR { bless [pop] }
sub FETCH     { $_[0][0] }
tie my $t, "", sub { "cluck up porridge" };
is eval { sub { goto $t }->() }//$@, 'cluck up porridge',
  'tied arg returning sub ref';

I agree that goto-sub.t would be a better name.

Revised; please review.

@tonycoz
Copy link
Contributor

tonycoz commented Sep 1, 2025

This looks fine, though it needs squashing

@jkeenan
Copy link
Contributor Author

jkeenan commented Sep 1, 2025

This looks fine, though it needs squashing

Thanks. Will first rebase on blead, then squash, then push.

@jkeenan jkeenan force-pushed the smoke-me/jkeenan/t-op-goto-split-20250829 branch from e49ddef to acf510e Compare September 1, 2025 12:22
Create t/op/goto-sub.t to hold tests for 'goto &NAME', as they will
presumably be unaffected by deprecation/fatalization of certain other
usages of 'goto'.

In the course of working on this a few other small cleanups were made,
e.g., disambiguation of various uses of $ok; small whitespace cleanup;
more use of {} blocks to distinguish among clusters of tests.
@jkeenan jkeenan force-pushed the smoke-me/jkeenan/t-op-goto-split-20250829 branch from acf510e to 1fb4461 Compare September 1, 2025 12:39
@jkeenan jkeenan merged commit c00b151 into blead Sep 1, 2025
67 checks passed
@jkeenan jkeenan deleted the smoke-me/jkeenan/t-op-goto-split-20250829 branch September 1, 2025 13:48
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.

3 participants