SYNOPSIS In dist.ini: ; it is recommended that the name of lump dist ends with '-Lumped' name=Perinci-CmdLine-Any-Lumped version=0.01 ; you should use minimal plugins and avoid those that munge files (e.g. ; OurVersion, PodWeaver, etc) [@Basic] [PERLANCAR::AddDeps] ; lump all modules from a single dist lump_dist = Perinci::CmdLine::Any ; lump all modules from a single dist and their recursive dependencies lump_dist_and_deps = Perinci::CmdLine::Any ; filter by author include_author = PERLANCAR ; all the lump_* and include_* configurations can be specified multiple times In your main module, e.g. "Perinci/CmdLine/Any/Lumped.pm" in lib: package Perinci::CmdLine::Any::Lumped; our $VERSION = 0.01; # LUMPED_MODULES # LUMPED_DISTS ... DESCRIPTION WARNING: EXPERIMENTAL This plugin will add one or more module files to your dist during building. When done carefully, this can reduce the number of dists that users need to download and install because they are already included in your dists. The module file(s) to be added must be indexed on (local) CPAN and installed on your local Perl installation (as they will be copied from the installed version on your local installation). They will thus be contained in their original distributions as well as on your lump dist. To avoid conflict, the lumped files on your lump dist will be excluded from indexing (using no_index in CPAN META) so PAUSE does not see them. How it works 1. Gather the module files to be added as specified in lump_dist and lump_dist_and_deps. To get a list of modules in a dist, or to get list of (recursive) dependencies, lcpan is used. Make sure you have lcpan installed and your local CPAN mirror is sufficiently up-to-date (use lcpan update regularly to keep it up-to-date). 2. Do some minimal munging on the files to be added: * If the POD indicates which dist the module is in, will replace it with our dist. For example if there is a VERSION section with this content: This document describes version 0.10 of Perinci::CmdLine::Any (from Perl distribution Perinci-CmdLine-Any), released on 2015-04-12. then the text will be replaced with: This document describes version 0.10 of Perinci::CmdLine::Any (from Perl distribution Perinci-CmdLine-Any-Lumped version 0.01), released on 2015-05-15. 3. Add all files into no_index metadata, so they don't clash with the original dists. 4. For all the dependencies found in #1 but excluded (not lumped), express them as dependencies. Other caveats/issues * Only module files from each distribution are included. This means other stuffs are not included: scripts/binaries, shared files, .pod files, etc. This is because PAUSE currently only index packages (~ modules). We have .packlist though, and can use it in the future when needed. * Currently all the dependency dists must be installed on your local Perl installation. (This is purely out of my coding laziness though. It could/should be extracted from the release file in local CPAN index though.) * SEE ALSO lcpan