fix: unify CPAN compatibility fixes for Type::Tiny and DBIx::Class - #885
Merged
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>
Track B::Hooks::EndOfScope callbacks against parser lexical scopes so namespace::clean removes nested imports at the correct compile boundary. Release temporary localized container contents during global local restoration to avoid retaining package-level caches across scopes. Generated with [Codex](https://openai.com/codex) Co-Authored-By: Codex <codex@openai.com>
Recursively clean discarded container values and clear weak references when an overwritten scalar no longer has a package-global strong path. Add a system-Perl-validated regression for Test::Deep's second-argument comparison case. Generated with [Codex](https://openai.com/codex) Co-Authored-By: Codex <codex@openai.com>
Collapse only the compiler-wrapper/interpreted-code duplicate when resolving caller(N), keeping recursive calls with the same name as distinct Perl frames. This restores Exporter::as_heavy's caller lookup so goto dispatch resolves heavy_export instead of the nonexistent heavy_as_heavy. Add a TAP regression covering the bundled Exporter path. Generated with [Codex](https://openai.com/codex) Co-Authored-By: Codex <codex@openai.com>
Preserve lexical warning metadata and runtime warning-bit overrides across interpreter eval STRING compilation, including warning-aware arithmetic. Correct incomplete infix-expression diagnostics so CPAN-generated quoted subroutines report the same source line as Perl. Generated with [Codex](https://openai.com/codex) Co-Authored-By: Codex <158243242+codex[bot]@users.noreply.github.com>
Prevent ${^WARNING_BITS} assignments from leaking into later top-level
compile-time warning handling; only eval STRING execution installs the
runtime override, and RuntimeCode restores the prior value on exit.
Generated with [Codex](https://openai.com/codex)
Co-Authored-By: Codex <158243242+codex[bot]@users.noreply.github.com>
Unify the Type::Tiny, namespace::clean, Test::Deep, Sub::Quote, and Hash::Merge compatibility work and address the regressions exposed by DBIx::Class and the combined CPAN acceptance suite. Add focused standard-Perl-validated regressions for closure lifetime, localized calls and hash slices, PadWalker rebinding, tied containers, Storable cloning, IPv6 formatting, anonymous caller names, UNIVERSAL::isa, and deterministic destruction. Generated with [Codex](https://openai.com/codex) Co-Authored-By: Codex <158243242+openai-codex@users.noreply.github.com>
Keep Perl's `(eval)` stack marker ahead of the anonymous-callback fallback so caller reports the correct subroutine name and hasargs value for eval BLOCK and eval STRING frames. Wire the interpreter's existing virtual eval-frame support into inline eval execution and unwind it across normal, exceptional, and non-local exits. Generated with [Codex](https://openai.com/codex) Co-Authored-By: Codex <158243242+openai-codex@users.noreply.github.com>
Keep the future user module directory in the parent jcpan process's include path and remove failed false-returning modules from INC so they can be retried correctly. Generated with [Codex](https://openai.com/codex/) Co-Authored-By: Codex <codex@openai.com>
Replace the dependency on an ignored local perl5/cpan checkout with a reduced in-test model of Test::Deep's localized wrapper-cache lifetime. This preserves the runtime regression coverage in clean Linux and Windows CI workspaces. Generated with [Codex](https://openai.com/codex/) Co-Authored-By: Codex <158243242+openai-codex[bot]@users.noreply.github.com>
Skip PerlOnJava-specific B::Deparse, interpreter launcher, and Java Net::SSLeay assertions when the suite runs under native Perl. Preserve their complete coverage under jperl, and tolerate hosts that prohibit IPv6 loopback binding while retaining the portable socket checks. Generated with [Codex](https://openai.com/codex/) Co-Authored-By: Codex <158243242+openai-codex[bot]@users.noreply.github.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
This PR combines and supersedes #882, #883, and #884.
It preserves the original Type::Tiny deparse/Storable/eval work, the
namespace::clean/Test::Deep/Exporter scope fixes, and the Sub::Quote/Hash::Merge
warning fixes. The combined review also fixes the integration issues exposed by
the wider CPAN and DBIx::Class suites:
callernamesPadWalker::set_closed_overclosure rebindingStorable::dcloneUNIVERSAL::isareject arbitrary plain strings as class invocantsgetnameinforesultsFocused regression tests were added for each issue and validated against
standard Perl before being run on PerlOnJava.
Validation
make— PASStimeout 1200 prove -r src/test/resources/unitwith system Perl — PASSmake test-bundled-modules— PASStimeout 2400 ./jcpan --jobs 8 DBIx::Class— PASSThe branch is ready for combined-PR validation.