Is it possible to not-install docs with ExeUtils::MakeMaker?

Viewed 42

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?

1 Answers

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
Related