Skip to content

Cleanup - break positional requirement of keywords #23343

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: blead
Choose a base branch
from

Conversation

happy-barney
Copy link

Proper behaviour of op.c depended on correct keyword order in regen/keywords.pl.

Affected logic was fragile and magic (% 3).

Change breaks such requirement, allowing alphabetical sorting (always improving maintenance).

  • Primary test
  • t/op/coreamp.t
  • This set of changes does not require a perldelta entry.

  • Follow-ups

  • improve documentation why some keywords are + and another -
  • use PPI to project changes to lib/B/Deparse.pm

Branislav Zahradník added 3 commits May 31, 2025 16:26
Perl_coresub_op generating OPs for __FILE__, __LINE__, and
__PACKAGE__ keywords relied on the exact order of their codes,
introducing a dependency between parser and runtime by using
magic transformation of keyword code to index into the return
list of `OP_CALLER`.
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.

1 participant