beyondgrep / ack3

ack is a grep-like search tool optimized for source code.
https://beyondgrep.com/
Other
705 stars 66 forks source link

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

Closed mauke closed 7 months ago

mauke commented 7 months ago

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

mauke commented 7 months ago

This might fix https://github.com/Perl/perl5/issues/22013; I haven't tried.

petdance commented 7 months ago

Thanks, done. ed82082

haarg commented 7 months ago

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

petdance commented 7 months ago

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

rjbs commented 7 months ago

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.

petdance commented 7 months ago

OK, done. 23b156a