Hacktoberfest 2026: die Issues, die Maintainer für den Oktober markiert haben – offen und einsteigerfreundlich. Hacktoberfest-Issues durchsuchen

Config::IniFiles initialization returns undef in CGI::Application plugin test

Geschlossen
#1,788 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

Ein zugehöriger Pull Request wurde bereits gemerged.

  • #1799 von @fglock — gemerged

Bewertung

Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Anfängerfreundlichkeit
18/100
Issue-Typ
Bug
Klarheit
Größtenteils klar
Aktivitätsstatus
Aktiv
Tech-Stack
java, perl
Bereich
backend

Rechercherichtung

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.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

area:io area:runtime bug

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-IniFiles 0.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::Application 4.61 and Config::IniFiles 3.003000.
  • PerlOnJava setup also used CGI::Application 4.61; the available Config::IniFiles is 3.003000. Its target test environment includes the distribution's test.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

  1. Add a focused regression that loads a small INI file with Config::IniFiles->new(-file => ...), checks the returned object and a known val, and runs on both PerlOnJava backends.
  2. Instrument or reduce the failing path to capture @Config::IniFiles::errors and determine why ReadConfig returns false under PerlOnJava. Fix the underlying runtime or file-reading incompatibility instead of masking the undefined object in the plugin.
  3. 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.

Vorherrschende Sprache
Perl
Sterne
64
Forks
7
Ø Merge
5 Std. 31 Min.
Gemergte PRs (30 T.)
214

Entwicklungsumgebung

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus fglock/PerlOnJava

Alle Issues in fglock/PerlOnJava

Ähnliche Issues

Weitere Issues zu Perl

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.