Skip to content

Preserve stash closures copied through each - #1966

Merged
fglock merged 2 commits into
masterfrom
fix/stash-each-typeglob-copy
Nov 4, 2026
Merged

fglock merged 2 commits into
masterfrom
fix/stash-each-typeglob-copy

Conversation

@fglock

@fglock fglock commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Preserve named stash glob snapshots returned by each, including their captured CODE slot and original glob identity.
  • Install copied CV slots with stash ownership accounting so module-created closures keep their captured lexical values.
  • Add regression coverage for closures created in eval, copied with each, and checked for captured values and coderef identity.

Fixes #1963

Validation

  • System Perl regression: 9/9 passed.
  • PerlOnJava regression: 9/9 passed on JVM and interpreter.
  • nice -n 19 make: passed.
  • DDC::Concordance 0.50: all 26 test files and 471 tests passed on the JVM backend; all five affected test files passed on the interpreter.
  • make check-links: passed.

Snapshot named stash globs returned as values, preserve the captured CODE
slot and whole-glob identity, and retain stash ownership when installing the
copied CV. Add eval-based regression coverage for captured values and CV
identity.

Fixes #1963

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

Co-Authored-By: Codex <codex@openai.com>
@fglock
fglock force-pushed the fix/stash-each-typeglob-copy branch from 6b89ca3 to d70b88e Compare November 4, 2026 13:09
Generated with [Codex](https://openai.com/codex/)

Co-Authored-By: Codex <codex@openai.com>
@fglock
fglock merged commit 58e8b2e into master Nov 4, 2026
2 checks passed
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.

Keep stash CODE globs callable after each/list assignment

1 participant