Config::IniFiles initialization returns undef in CGI::Application plugin test
维护者通常 1 天内回复
已经有一个关联 PR 被合并了。
- #1799 来自 @fglock —— 已合并
评估
调研方向
The failure is in t/CGI-Application-Plugin-Config-IniFiles.t and t/TestConfigIniFiles.pm at the run_mode call to $self->config->val("main", "title"). Start by reproducing with a small script that calls Config::IniFiles->new(-file => ...) on the distribution's test.conf and printing @Config::IniFiles::errors to see why ReadConfig returns false under PerlOnJava. Done means the object is defined on both backends and all 9 assertions pass.
由索引模型根据 Issue 内容生成。
描述
Summary
The CPAN test suite for CGI-Application-Plugin-Config-IniFiles 0.03 fails under PerlOnJava when the plugin reads its valid test.conf configuration. System Perl passes the full target suite.
Failure evidence
- CPAN tester run:
20261013-145839-84917 - Distribution:
CGI-Application-Plugin-Config-IniFiles0.03 (ARTO) - Failing test:
t/CGI-Application-Plugin-Config-IniFiles.t - Failure site:
t/TestConfigIniFiles.pm,run_mode, at$self->config->val("main", "title") - PerlOnJava result: test exits after 2 of 9 planned assertions with
Can't call method "val" on an undefined value. - System Perl oracle: all 9 tests pass. The archived oracle used Perl 5.42.2 and installed
CGI::Application4.61 andConfig::IniFiles3.003000. - PerlOnJava setup also used
CGI::Application4.61; the availableConfig::IniFilesis 3.003000. Its target test environment includes the distribution'stest.conf.
Root cause
CGI::Application::Plugin::Config::IniFiles::config_file assigns the return value of Config::IniFiles->new(-file => $file) to the app's __CONFIG field. In the failing PerlOnJava run, that initialization produces undef; the plugin's config() accessor then returns the stored undef, causing the later val call to fail. The same valid configuration initializes successfully under system Perl.
This localizes the incompatibility to PerlOnJava's interaction with Config::IniFiles initialization or file parsing. The archived output does not include @Config::IniFiles::errors or identify the specific low-level operation, so the precise parser/filehandle semantic still needs to be isolated.
Proposed fix
- Add a focused regression that loads a small INI file with
Config::IniFiles->new(-file => ...), checks the returned object and a knownval, and runs on both PerlOnJava backends. - Instrument or reduce the failing path to capture
@Config::IniFiles::errorsand determine whyReadConfigreturns false under PerlOnJava. Fix the underlying runtime or file-reading incompatibility instead of masking the undefined object in the plugin. - Keep the plugin integration scenario as coverage and require all 9 upstream assertions to pass on both backends and system Perl.
Environment and limitations
The available archived log records the macOS Homebrew system Perl path, but does not record the PerlOnJava commit, JVM version, or an interpreter-backend result. Reverse-dependency counts do not apply: this distribution and the identified dependencies are pure Perl.
- 主要语言
- Perl
- 星标
- 64
- 派生
- 7
- 平均合并
- 5 小时 39 分钟
- 30 天内合并 PR
- 213
环境准备
- 提供 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
fglock/PerlOnJava 的其他 Issue
-
bug
难度 2/5 1-3 小时 新手友好度 72/100
fglock/PerlOnJava#1579 ·
维护者通常 1 天内回复
-
难度 3/5 1-2 天 新手友好度 48/100
fglock/PerlOnJava#1835 ·
维护者通常 1 天内回复
-
area:cpan-port bug
难度 3/5 1-2 天 新手友好度 68/100
fglock/PerlOnJava#1820 ·
维护者通常 1 天内回复
-
难度 3/5 半天 新手友好度 45/100
fglock/PerlOnJava#1808 ·
维护者通常 1 天内回复
-
area:cpan-port area:runtime bug
难度 4/5 3-5 天 新手友好度 28/100
fglock/PerlOnJava#1802 · 2 条评论 ·
维护者通常 1 天内回复
查看 fglock/PerlOnJava 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 80/100
jimsalterjrs/sanoid#1116 · 1 个 reaction ·
-
Add .gitattributes so share/skel keeps LF on a Windows git checkout可能已有人在做 @sadhana-s-codez 于 2 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 85/100
PerlDancer/Dancer2#1854 · 1 条评论 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 78/100
major/MySQLTuner-perl#1007 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 88/100
-
难度 1/5 1 小时以内 新手友好度 88/100