fix: preserve Type::Tiny deparse source metadata - #882
Closed
fglock wants to merge 7 commits into
Closed
Conversation
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> (cherry picked from commit 57a55e4)
Carry anonymous-sub source spans through Internals and RuntimeCode definition transfers so B::Deparse can recover compiler-retained source for CPAN closures. Use the exact span before line-based source heuristics and retain compatibility with existing source-visible deparse behavior. Generated with [Codex](https://openai.com/codex) Co-Authored-By: Codex <158243242+openai-codex@users.noreply.github.com>
Carry parser source spans and bounded source text through interpreted anonymous subroutines and closure copies. Make B::Deparse use the standard source formatter while honoring ambient pragmas and AST offsets that fall inside the subroutine body. Generated with [Codex](https://openai.com/codex) Co-Authored-By: Codex <158243242+codex[bot]@users.noreply.github.com>
Include each distribution's inc directory in the PERL5LIB generated for Test::Harness child processes. This lets bundled test helpers such as Test::Fatal remain discoverable during jcpan test runs. Generated with [Codex](https://openai.com/codex) Co-Authored-By: Codex <158243242+codex[bot]@users.noreply.github.com>
Make Scalar::Util::looks_like_number treat false as non-numeric while true remains numeric, matching Perl and the Type::Tiny numeric constraints. Generated with [Codex](https://openai.com/codex) Co-Authored-By: Codex <158243242+codex[bot]@users.noreply.github.com>
Preserve blessed Perl die payloads when eval compilation catches a BEGIN-time exception, and parse known callback subs with block arguments as anonymous CODE references. Generated with Codex Co-Authored-By: Codex <noreply@openai.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
RuntimeCodetransfers.Internals::jperl_cv_deparse_info.B::Deparseprefer exact runtime spans and retain source-visible fallback behavior.Validation
make— passes.Error-TypeTiny-Assertion/basic.t— still has one failure: theAny->create_child_typeexplanation reportssub { "DUMMY" }instead ofsub { 0; }.The remaining Type::Tiny failure is documented explicitly so CI/review can confirm whether the unresolved path is covered by the project checks.
Generated with Codex
Co-Authored-By: Codex 158243242+openai-codex@users.noreply.github.com