Skip to content

Fix bundled CPAN module regressions#858

Merged
fglock merged 1 commit into
masterfrom
fix/bundled-cpan-modules
Jun 13, 2026
Merged

Fix bundled CPAN module regressions#858
fglock merged 1 commit into
masterfrom
fix/bundled-cpan-modules

Conversation

@fglock

@fglock fglock commented Jun 13, 2026

Copy link
Copy Markdown
Owner

Summary

  • Fix weak-reference lifetime handling exposed by DBIx::Class by deferring auto weak sweeps while temporary roots protect return-value assignment handoff.
  • Add bundled CPAN fixes for Class::DBI and XML::TreePP, including distroprefs/patches and missing bundled support modules used by their dependency chains.
  • Add regression coverage for weak cache cleanup after failed construction, returned object handoff assignment, and slice context behavior.

Notes

The Class::DBI patch is not a test bypass. Class::DBI objects overload boolean context, so the live-object cache must test ref rather than truthiness. Class::DBI already uses the same ref pattern in its HasA relationship code because overloaded objects may appear false.

DBIx::Class uncovered a separate runtime lifetime issue: an immediate weak sweep could run while a returned object graph was only protected by temporary roots during caller assignment. The runtime fix is generic and does not special-case DBI or DBIx::Class.

Verification

  • make
  • make test-bundled-modules
  • timeout 3600 ./jcpan -t DBIx::Class
  • timeout 1800 ./jcpan -t Class::DBI
  • timeout 900 ./jcpan -t XML::TreePP
  • New unit tests validated with system perl before jperl
  • git diff --check

Fix remaining bundled CPAN module failures for Class::DBI and XML::TreePP, and repair weak-reference lifetime handling exposed by DBIx::Class. Defer automatic weak sweeps while temporary roots protect return-value handoff so live object graphs are not destroyed before caller assignment completes.

Add regression coverage for weak cache cleanup after failed construction and returned object handoff assignment.

Generated with OpenAI Codex

Co-Authored-By: OpenAI Codex <codex@openai.com>
@fglock fglock merged commit bb8a491 into master Jun 13, 2026
2 checks passed
@fglock fglock deleted the fix/bundled-cpan-modules branch June 13, 2026 17:33
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