Skip to content

Bug 1892549: Don't scan lib/ for modules in Makefile.PL - #192

Open
topunix wants to merge 1 commit into
bugzilla:mainfrom
topunix:bug-1892549
Open

topunix wants to merge 1 commit into
bugzilla:mainfrom
topunix:bug-1892549

Conversation

@topunix

@topunix topunix commented Sep 23, 2026

Copy link
Copy Markdown
Contributor

Fixes make cpanfile failing with "multiple target patterns" when lib/ contains installed modules.

Cause

With no PM or PMLIBDIRS set, MakeMaker scans lib/ and Bugzilla/ (from NAME). Modules installed into lib/ by older tooling can have :: in their filenames, and those end up as make targets, which make rejects.

Fix

Set PMLIBDIRS => ['Bugzilla']. Bugzilla/ is scanned exactly as before; lib/ is skipped. Harmony installs Perl dependencies into local/, so nothing in lib/ is needed here.

This doesn't delete lib/ as suggested in the bug, since lib/README is tracked and would be removed on every run.

Testing

  • Reproduced by adding lib/x/Foo::Bar.pm and running perl Makefile.PL && make cpanfile: fails with multiple target patterns.
  • With the fix, the same file is no longer picked up in the generated Makefile's module lists, and make cpanfile gets past Makefile parsing.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant