Skip to content
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

squash: put each file in its own separate scope #376

Closed
wants to merge 1 commit into from

Conversation

mauke
Copy link

@mauke mauke commented Feb 21, 2024

This way pragmas and lexical variables don't leak from one module section to the next in ack-standalone.

@mauke
Copy link
Author

mauke commented Feb 21, 2024

This might fix Perl/perl5#22013; I haven't tried.

@petdance
Copy link
Collaborator

Thanks, done. ed82082

@petdance petdance closed this Feb 25, 2024
@haarg
Copy link

haarg commented Mar 1, 2024

What was the reason for avoiding the separate scope for ack? That has caused this to still fail on perl 5.39.8.

@petdance
Copy link
Collaborator

petdance commented Mar 1, 2024

I didn't think it was necessary. If it's a problem I can scope the main ack part.

@petdance petdance reopened this Mar 1, 2024
@rjbs
Copy link

rjbs commented Mar 1, 2024

The problem is that the program is now like this:

use 5.010;
{
  package X;
  use 5.010;
}

That isn't permitted. This is a silly rule, and will go away in the next monthly perl release. But meantime, ack-standalone remains a problem for the test suite. I think it's reasonable to wait for the next release, but meantime this problem will persist.

This way pragmas and lexical variables don't leak from the main script
to module sections in ack-standalone.
@petdance
Copy link
Collaborator

petdance commented Mar 6, 2024

OK, done. 23b156a

@petdance petdance closed this Mar 6, 2024
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.

4 participants