2

I'm looking into setting up Perl micro services with Docker and Alpine. Alpine's convention is not be weighed down by docs/man pages by default.

If my Makefile.PL uses ExeUtils::MakeMaker is there a way to not-install docs?

Evan Carroll
  • 78,363
  • 46
  • 261
  • 468

1 Answers1

1

You can see the targets available

perl Makefile.PL
grep -i phony ./Makefile

They are

all config static dynamic test linkext manifest blibdirs clean realclean disttest distdir pure_all subdirs clean_subdirs makemakerdflt manifypods realclean_subdirs subdirs_dynamic subdirs_pure_nolink subdirs_static subdirs-test_dynamic subdirs-test_static test_dynamic test_static

It seems all of those options pertianing to install call manifypods and install the POD files.

I think the best you can do is to remove the pod files afterwards and purge the man pages. I did that by adding something like this to my Docker's RUN line to comprehensively clean up,

&& cpanm --installdeps .
&& perl Makefile.PL
&& make
&& make install
&& make distclean
&& rm -rfv ~/.cpanm /usr/local/share/man \
&& find /usr/share/perl5/ -name '*.pod' -delete
Evan Carroll
  • 78,363
  • 46
  • 261
  • 468
  • Related: [Where does CPAN install modules?](https://stackoverflow.com/q/46778215/589924). I wonder what happens if you specify an empty string for a directory (e.g. by passing `INSTALLMAN1DIR= INSTALLMAN3DIR= ` to `Makefile.PL`) – ikegami Jul 18 '20 at 23:04