Skip to content

fix: DBIx::Simple jcpan stabilization (JDBC hashes + method chain)#751

Merged
fglock merged 3 commits into
masterfrom
feature/dbix-simple-jcpan
May 16, 2026
Merged

fix: DBIx::Simple jcpan stabilization (JDBC hashes + method chain)#751
fglock merged 3 commits into
masterfrom
feature/dbix-simple-jcpan

Conversation

@fglock
Copy link
Copy Markdown
Owner

@fglock fglock commented May 16, 2026

Summary

  • Stabilizes ./jcpan -t DBIx::Simple and JDBC-backed DBIx workflows: bundled DBIx/Simple (JAR jar:PERL5LIB, built from src/main/perl/lib) with JDBC-aware statement handling (keep_statements = 0 when appropriate). Launcher jcpan does not prepend a checkout-only filesystem tree to PERL5LIB — see dev/modules/dbix_simple.md for @INC order and stale ~/.perlonjava/lib shadowing.
  • Layer B — Blessed method-chain temporaries (scalar $db->query(...)->arrays) retain the invocant across dispatch via refcount hold + dispatchPerlMethodAfterSelfInjected (RuntimeCode.java).
  • Layer C — JDBC DBI.fetchrow_hashref honors $sth->fetchrow_hashref('NAME_lc') (and FetchHashKeyName) like DBI.pm, fixing upstream t/sqlite.t expectations under JCPAN_RUN_BUNDLED_TESTS=1.
  • Adds dev/modules/dbix_simple.md, dev/tools/dbix_simple_chain_repro.pl, and unit test unit/dbi_fetchrow_hashref_name_lc.t (post-merge checklist lives in the module doc).

Test plan

  • make
  • timeout 120 ./jperl dev/tools/dbix_simple_chain_repro.pl (with JAR bundle; clear ~/.perlonjava/lib/DBIx/Simple.pm if keep_statements is not 0)
  • JCPAN_RUN_BUNDLED_TESTS=1 timeout 600 ./jcpan -t DBIx::Simple (all t/ PASS)

fglock and others added 3 commits May 16, 2026 18:18
Captured pre-existing jcpan/PERL5LIB + DBIx/DBI/runtime edits before structured fix.

Co-authored-by: Cursor <[email protected]>
- Hold blessed method invocants across dispatchPerlMethodAfterSelfInjected /
  callCachedInner refcount boundaries (scalar $db->query->arrays).
- JDBC fetchrow_hashref honors second arg and NAME fallback like DBI.pm.
- Add dev/tools/dbix_simple_chain_repro.pl and dev/modules/dbix_simple.md.
- Unit regression: dbi_fetchrow_hashref_name_lc.t.

Generated with [Cursor](https://cursor.com/docs)

Co-Authored-By: Cursor <[email protected]>
Launcher no longer prepends checkout-only src/main/perl/lib — bundled
.pm remain jar:PERL5LIB unless ~/.perlonjava/lib shadows. Refresh
dbix_simple.md and chain repro banner.

Generated with [Cursor](https://cursor.com/docs)

Co-Authored-By: Cursor <[email protected]>
@fglock fglock merged commit 9c08ca1 into master May 16, 2026
2 checks passed
@fglock fglock deleted the feature/dbix-simple-jcpan branch May 16, 2026 17:48
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