Skip to content

fix: honor Storable Deparse for code references - #876

Open
fglock wants to merge 3 commits into
masterfrom
fix/compiler-color-calc-cpan
Open

fix: honor Storable Deparse for code references#876
fglock wants to merge 3 commits into
masterfrom
fix/compiler-color-calc-cpan

Conversation

@fglock

@fglock fglock commented Jul 30, 2026

Copy link
Copy Markdown
Owner

Summary

  • Honor Storable::Deparse in the shared Java Storable writer for pure-Perl code references.
  • Add a regression test, validated with standard Perl.

Verification

  • prove src/test/resources/unit/storable_code_deparse.t — pass
  • make — compilation completed; full parallel test output was still running when the tool session ended.
  • timeout 300 ./jcpan -t Struct::Diff — code-reference freeze failures removed; remaining failures are separate reference/lvalue cases.

Generated with Codex

fglock and others added 3 commits July 30, 2026 14:54
Allow the native Storable writer to serialize Perl code references when Storable::Deparse is enabled, using compiler-retained source text. Add a unit regression test validated against standard Perl.

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

Co-Authored-By: Codex <158243242+openai-codex[bot]@users.noreply.github.com>
Use the anonymous subroutine token index when retaining source text for
Storable::Deparse. The block child index can point at a later enclosing block,
causing adjacent closures to serialize the wrong source and breaking
Struct::Diff and JSON::Patch comparisons.

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

Co-Authored-By: Codex <158243242+openai-codex[bot]@users.noreply.github.com>
Record the exclusive closing-token index for parsed anonymous subs and carry
the resulting source span into RuntimeCode. Storable can then serialize the
exact compiler span without attempting to parse Perl delimiters at runtime.
Expand the regression coverage for quote-like braces and adjacent closures.

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

Co-Authored-By: Codex <158243242+openai-codex[bot]@users.noreply.github.com>
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