Config::IniFiles initialization returns undef in CGI::Application plugin test
メンテナーはふだん 1 日以内に返信
関連するプルリクエストがすでにマージされています。
- #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時間 31分
- マージ済み PR(30日)
- 214
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
-
Add .gitattributes so share/skel keeps LF on a Windows git checkout対応中かも @sadhana-s-codez が 1 日前に担当しました。 オープン
難易度 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
-
難易度 2/5 1〜3時間 初心者へのやさしさ 69/100
bioconda/bioconda-recipes#70187 ·
メンテナーはふだん 2 日以内に返信