Skip to content

Fix namespace::clean and DBIx::Class weak closure tests#782

Merged
fglock merged 3 commits into
masterfrom
fix/dbix-class-pr779-followup
May 21, 2026
Merged

Fix namespace::clean and DBIx::Class weak closure tests#782
fglock merged 3 commits into
masterfrom
fix/dbix-class-pr779-followup

Conversation

@fglock
Copy link
Copy Markdown
Owner

@fglock fglock commented May 21, 2026

Summary

  • includes PR Fix namespace::clean CPAN tests #779 namespace::clean support commit
  • fixes CODE weak-ref cleanup so DBIx::Class BlockRunner can weaken and invoke live closure arguments
  • adds a regression test for weaken(my $copy = shift) on captured closures

Verification

  • timeout 1200 make -> pass
  • timeout 600 ./jcpan -t namespace::clean -> pass, 2099 tests
  • timeout 240 jperl t/100extra_source.t -> pass
  • timeout 240 jperl t/100populate.t -> pass
  • timeout 1200 ./jcpan -t DBIx::Class -> timed out after 20 minutes with no failures through t/86might_have.t; earlier failures t/100extra_source.t, t/100populate.t, and t/101populate_rs.t now pass

@fglock fglock force-pushed the fix/dbix-class-pr779-followup branch from 52ed45b to 4d4acb4 Compare May 21, 2026 12:25
fglock and others added 3 commits May 21, 2026 15:02
Normalize parser token mismatch diagnostics to Perl-style syntax errors, preserve bareword filehandle IO slot identity across open, and restore IO slots through Package::Stash glob assignment.

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

Co-Authored-By: Codex <codex@openai.com>
DBIx::Class::Storage::BlockRunner weakens a fresh closure argument copy
before invoking it. Perl keeps the caller's strong lexical alive, but
PerlOnJava's CODE weak-ref sweep cleared the weak copy immediately when
the closure had no counted owners.

Teach the CODE weak-ref cleanup path to preserve weak CODE refs while a
current live scalar still points at the same RuntimeCode, without
preserving stale deleted stash slots used by Sub::Quote cleanup.

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

Co-Authored-By: Codex <codex@openai.com>
When tie receives a class-name string, resolve the TIE* constructor directly through package method lookup instead of routing through generic string method dispatch. Generic dispatch treats a same-named IO slot as a filehandle object, which regressed op/tie.t after bareword filehandles began preserving IO::File identity.

Add a focused regression test for fileno FOO followed by tie @array, "FOO".

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

Co-Authored-By: OpenAI Codex <codex@openai.com>
@fglock fglock force-pushed the fix/dbix-class-pr779-followup branch from 9456dcd to 8ee8047 Compare May 21, 2026 13:04
@fglock fglock merged commit 624c0fd into master May 21, 2026
2 checks passed
@fglock fglock deleted the fix/dbix-class-pr779-followup branch May 21, 2026 13:18
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