Subject: | Building distmeta target fails but make continues. |
Makefile generated by MakeMaker includes following rule:
# --- MakeMaker distmeta section:
distmeta : create_distdir metafile
$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'exit unless -e q{META.yml};' \
-e 'eval { maniadd({q{META.yml} => q{Module YAML meta-data (added by MakeMaker)}}) }' \
-e ' or print "Could not add META.yml to MANIFEST: $$$${'\''@'\''}\n"' --
$(NOECHO) cd $(DISTVNAME) && $(ABSPERLRUN) -MExtUtils::Manifest=maniadd -e 'exit unless -f q{META.json};' \
-e 'eval { maniadd({q{META.json} => q{Module JSON meta-data (added by MakeMaker)}}) }' \
-e ' or print "Could not add META.json to MANIFEST: $$$${'\''@'\''}\n"' --
If for any reason adding META.yml and/or META.json to MANIFEST fails, error message will be printed:
Could not add META.json to MANIFEST: ...
but make will continue. It is very easy to miss this message in the log. Make must stop if updating MANIFEST failed. Trivial fix allows it: just use "die" instead of "print".
Code to fix is located in MM_Any.pm, line ~1420.