Skip to content

fix(require): preserve @INC hook generator state - #1324

Merged
fglock merged 1 commit into
masterfrom
fix/inc-hook-generator-state
Sep 9, 2026
Merged

fix(require): preserve @INC hook generator state#1324
fglock merged 1 commit into
masterfrom
fix/inc-hook-generator-state

Conversation

@fglock

@fglock fglock commented Sep 9, 2026

Copy link
Copy Markdown
Owner

Summary

  • preserve state returned beside an @INC hook source generator
  • add regression coverage validated on system Perl, JVM, and interpreter backends
  • record the compatibility fix in the changelog

Validation

  • make
  • make check-links
  • timeout 60 perl src/test/resources/unit/inc_hook_generator_state.t
  • timeout 90 ./jperl src/test/resources/unit/inc_hook_generator_state.t
  • timeout 90 ./jperl --interpreter src/test/resources/unit/inc_hook_generator_state.t

Decode the generator hook return form as (generator, state), rather than
only reading the state slot used by filehandle filters. Pass state through
the generator's @_ by alias so repeated calls do not leak state references.
Add JVM and interpreter regression coverage and document the compatibility
fix.

Generated with [Codex](https://openai.com/codex/)

Co-authored-by: Codex <codex@openai.com>
@fglock
fglock force-pushed the fix/inc-hook-generator-state branch from 9b2b575 to e39be21 Compare September 9, 2026 17:06
@fglock
fglock merged commit 2662973 into master Sep 9, 2026
2 checks passed
@fglock
fglock deleted the fix/inc-hook-generator-state branch September 9, 2026 17:54
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