in reply to .pm files that aren't part of a distro

It ignores them in "t/" but just in case you ever need to get CPAN to ignore some modules elsewhere, you can add a "noindex" directive to your META.yml file. For example, to ignore .pm files in an "examples/" directory:

noindex: directory: - examples

Read the full META.yml spec for details.

With Module::Build, you just have to add the following to your Build.PL file:

meta_add => { noindex => { directory => [ qw/examples/ ] } },

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.