Module::Build omits declared nested Perl module from blib

Open
#1,432 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Active
Tech stack
perl
Domain
build-system

Research direction

Start with PerlOnJava's Module::Build file-discovery and staging logic, comparing lib/AudioFile/Info/MP3/Tag.pm with the generated blib/lib tree after Build. Add focused regression coverage that checks the nested module is staged, then run t/1_read.t, t/2_write.t, and t/4_pod_coverage.t. Done means the module is available from blib/lib and the distribution tests pass like system Perl.

Written by the indexing model from the issue text.

Description

area:cpan-port area:release bug

Summary

AudioFile::Info::MP3::Tag v1.6.4 fails under PerlOnJava because the Module::Build-based build omits its declared plugin module from blib/lib.

The distribution source contains lib/AudioFile/Info/MP3/Tag.pm, and META.yml correctly provides AudioFile::Info::MP3::Tag, but after the PerlOnJava Build step the generated blib/lib contains AudioFile/Info/Build.pm and does not contain AudioFile/Info/MP3/Tag.pm.

Evidence

  • CPAN run: 20260918-141920-96054
  • Distribution: AudioFile::Info::MP3::Tag v1.6.4
  • System Perl: PASS, 4 files and 25 tests
  • PerlOnJava: FAIL, 3/4 test programs and 2/6 reported subtests

The PerlOnJava failure is:

Can't locate object method "new" via package "AudioFile::Info::MP3::Tag"

It occurs in AudioFile::Info::Info.pm while the plugin-backed tests are trying to construct the MP3 handler. The same missing plugin also causes both POD-coverage checks to report that requiring AudioFile::Info::MP3::Tag failed.

The source package has:

lib/AudioFile/Info/MP3/Tag.pm

but the resulting build tree contains only:

blib/lib/AudioFile/Info/Build.pm

and no blib/lib/AudioFile/Info/MP3/Tag.pm.

Reproduction

Run the CPAN test for AudioFile::Info::MP3::Tag v1.6.4 with PerlOnJava. The dependency builds complete, including AudioFile::Info and MP3::Tag, but the final Build test fails in t/1_read.t, t/2_write.t, and t/4_pod_coverage.t because the plugin is not available from the build output.

The relevant build output reports AudioFile::Info-MP3-Tag as built successfully, despite the missing module file.

Expected behavior

A successful Module::Build build must copy every declared Perl module from lib/ into the corresponding blib/lib/ path. In this case it should produce:

blib/lib/AudioFile/Info/MP3/Tag.pm

The subsequent test environment should then be able to load the plugin and run the 25 tests successfully, matching system Perl.

Requested fix

Investigate PerlOnJava's Module::Build file-discovery or staging logic for nested module paths and ensure that ordinary declared pure-Perl modules are copied into blib/lib during Build.

Add focused regression coverage that verifies a nested module such as AudioFile::Info::MP3::Tag is present in blib/lib after a Module::Build build, then rerun the distribution's test suite.

Related issues

  • Related to #1294, which tracks missing generated pure-Perl modules in XS fallback builds. This report concerns an ordinary source module that is present in lib/ but omitted from blib/lib.
  • Related to #1372, which tracks missing MakeMaker pm_to_blib build markers. This report concerns the module staging result itself rather than the marker file.
Dominant language
Perl
Stars
64
Forks
6
Avg merge
5h 25m
Merged PRs (30d)
157

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from fglock/PerlOnJava

All issues in fglock/PerlOnJava

Similar issues

More Perl issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.