Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

DBI: DBD::Sponge cannot initialize under PerlOnJava

未关闭
#1,398 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
55/100
Issue 类型
缺陷
描述清晰度
基本清楚
活跃度
活跃
技术栈
perl
领域
databases

调研方向

从 DBI->install_driver("Sponge") 开始,跟踪到 DBD::Sponge::driver,重点关注 DBD::Sponge::db 如何继承或解析 install_method。比较 PerlOnJava 兼容层与纯 Perl handle 继承,然后在两个后端上运行 t/01-connect.t 和 t/02-reconnect.t;当 upstream suite 在 PerlOnJava 下通过时,即表示完成。

由索引模型根据 Issue 内容生成。

描述

bug

Summary

MooX::Role::DBIConnection 0.07 fails its connection tests under PerlOnJava because the bundled pure-Perl DBD::Sponge driver cannot initialize.

Reproduction

CPAN random tester run: 20260916-111623-23683

Affected upstream tests:

  • t/01-connect.t
  • t/02-reconnect.t

Both fail on the JVM backend and the interpreter backend when the tests use the dbi:Sponge: DSN.

The failure is reported as:

Can't connect to data source '' because I can't work out what driver to use

The minimal driver initialization path is DBI->install_driver("Sponge"), which reaches DBD::Sponge->driver and fails because DBD::Sponge::db->install_method is unavailable.

Expected result

The upstream suite passes completely under system Perl: 3 test files and 6 tests successful.

Actual result

PerlOnJava fails 2 of 3 test programs; t/00-load.t passes. DBD::Sponge is bundled with PerlOnJava and can be loaded directly, so this is not a missing CPAN dependency or an external database prerequisite.

Suspected cause

The PerlOnJava DBI compatibility layer defines install_method on DBD::_::common, but the pure-Perl database-handle inheritance used by DBD::Sponge::db does not expose that method through its DBD::_::db base. Align the pure-Perl DBI handle inheritance or otherwise provide the upstream-compatible method dispatch.

This affects both execution backends and should have focused regression coverage for connecting through dbi:Sponge: and reconnecting.

主要语言
Perl
星标
64
派生
6
平均合并
5 小时 38 分钟
30 天内合并 PR
170

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

fglock/PerlOnJava 的其他 Issue

查看 fglock/PerlOnJava 的全部 Issue

相似的 Issue

更多 Perl Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。