fix: scan root-level .pm files alongside lib/ in MakeMaker#500
Closed
fix: scan root-level .pm files alongside lib/ in MakeMaker#500
Conversation
PerlOnJava's ExtUtils::MakeMaker only scanned root-level .pm files as a fallback when lib/ found nothing. Distributions like Math::Base::Convert that have the main .pm at the root alongside sub-modules in lib/ would silently drop the main module file. Now root-level .pm files and BASEEXT directories are always scanned (with dedup), matching real MakeMaker's PMLIBDIRS behavior. Before: Math::Base::Convert 0/20 tests pass (Can't locate Convert.pm) After: Math::Base::Convert 15/20 tests pass Generated with [Devin](https://cli.devin.ai/docs) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ExtUtils::MakeMakerto scan root-level.pmfiles alongsidelib/, not just as a fallback whenlib/is emptyPMLIBDIRSbehavior where./*.pmmaps to$(INST_LIBDIR)/*.pm.pmat root, sub-modules inlib/)Root Cause
PerlOnJava's
_install_pure_perlonly scanned root-level.pmfiles whenlib/found nothing (if (!%pm && $name)). Distributions likeMath::Base::ConverthaveConvert.pmat the root and sub-modules underlib/Math/Base/Convert/, so the main module was silently dropped during install.Test Results
Math::Base::Convert:
Can't locate Math/Base/Convert.pm)Test plan
makepasses (build + unit tests)jcpan -t Math::Base::Convertnow finds and loads the moduleGenerated with Devin