Skip to content

we aren't going to run late INIT blocks, so don't save them #23219

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 1 commit into
base: blead
Choose a base branch
from

Conversation

tonycoz
Copy link
Contributor

@tonycoz tonycoz commented Apr 23, 2025

I was looking over #1674, where it was suggested that late INIT blocks behave like BEGIN, and Larry approved of that (25 years ago).

But history has moved on, we have 25 years of code developed under the current behaviour of INIT and I suspect such a change is more likely to break existing code than fix anything.

But looking at the code in S_process_special_blocks() we do still push the CV onto PL_initav, even though that CV will never be called.

So don't push the CV if it's too late to call it.


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

I was looking over Perl#1674, where it was suggested that late INIT blocks
behave like BEGIN, and Larry approved of that (25 years ago).

But history has moved on, we have 25 years of code developed under the
current behaviour of INIT and I suspect such a change is more likely
to break existing code than fix anything.

But looking at the code in S_process_special_blocks() we do still push
the CV onto PL_initav, even though that CV will never be called.

So don't push the CV if it's too late to call it.
@jkeenan jkeenan added the defer-next-dev This PR should not be merged yet, but await the next development cycle label Apr 23, 2025
@jkeenan
Copy link
Contributor

jkeenan commented Apr 23, 2025

We can begin to discuss this p.r., but due to code freeze cannot merge it until the 5.43 development cycle starts. Hence, I've labelled this "defer-next-dev."

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defer-next-dev This PR should not be merged yet, but await the next development cycle
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants