Skip to content

Stop suppressing MYMETA so installers can discover our prerequisites#7

Open
melo wants to merge 1 commit into
mkende:mainfrom
melo:fix-no-mymeta-dep-discovery
Open

Stop suppressing MYMETA so installers can discover our prerequisites#7
melo wants to merge 1 commit into
mkende:mainfrom
melo:fix-no-mymeta-dep-discovery

Conversation

@melo

@melo melo commented Jul 6, 2026

Copy link
Copy Markdown

Setting NO_MYMETA => 1 prevented perl Makefile.PL from writing MYMETA.json/MYMETA.yml. Installers such as App::cpm (cpm) and App::cpanminus (cpanm) discover a distribution's prerequisites from the MYMETA produced by the configure step, not from the static META.json in the tarball. As a result, whenever Markdown::Perl was pulled in as a dependency (for example a cpanfile with requires 'Markdown::Perl' when generating a cpanfile.snapshot), cpm saw it as having no dependencies and silently omitted all of its runtime prerequisites (Unicode::CaseFold, Encode::Locale, List::MoreUtils, YAML::Tiny, Readonly).

Removing NO_MYMETA restores MYMETA generation. We keep dynamic_config => 0 since our prerequisites are declared statically in the cpanfile; the generated META.json/META.yml content is unchanged. MANIFEST.SKIP and .gitignore are updated so the regenerated MYMETA files never leak into git or the distribution tarball.

Note: Makefile.PL is generated from the perl_setup_dist (Dist::Setup) template, so the same fix should be applied upstream in Dist::Setup to prevent it being reintroduced on the next regeneration.

Setting NO_MYMETA => 1 prevented `perl Makefile.PL` from writing
MYMETA.json/MYMETA.yml. Installers such as App::cpm (cpm) and
App::cpanminus (cpanm) discover a distribution's prerequisites from the
MYMETA produced by the configure step, not from the static META.json in
the tarball. As a result, whenever Markdown::Perl was pulled in as a
dependency (for example a cpanfile with `requires 'Markdown::Perl'` when
generating a cpanfile.snapshot), cpm saw it as having no dependencies and
silently omitted all of its runtime prerequisites (Unicode::CaseFold,
Encode::Locale, List::MoreUtils, YAML::Tiny, Readonly).

Removing NO_MYMETA restores MYMETA generation. We keep dynamic_config => 0
since our prerequisites are declared statically in the cpanfile; the
generated META.json/META.yml content is unchanged. MANIFEST.SKIP and
.gitignore are updated so the regenerated MYMETA files never leak into
git or the distribution tarball.

Note: Makefile.PL is generated from the perl_setup_dist (Dist::Setup)
template, so the same fix should be applied upstream in Dist::Setup to
prevent it being reintroduced on the next regeneration.
@mkende

mkende commented Jul 7, 2026

Copy link
Copy Markdown
Owner

Hi @melo, thanks for the PR. I have just uploaded version 1.12 to CPAN with 80cff0d (equivalent to your proposal but without the AI comments in it).

Note that the MYMETA file is not required by standard toolchains (only META is required), so you might encounter that with other packages.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants