Dist::Z...therDir(3)

✨ NAME ✨

ok so this is Dist::Zilla::Plugin::GatherDir (from the Dist::Z...therDir(3) corner of the perl man pages πŸ’…) and it's literally a plugin that gathers all the files in a directory. that's it. that's the whole job. πŸŽ€

🌸 VERSION 🌸

version 6.040 bestie, don't @ me with older ones

πŸ¦‹ DESCRIPTION πŸ¦‹

This is a very, very simple FileGatherer plugin. no thoughts, head empty, just files. it looks in the directory named in the root attribute and adds all the files it finds there. and if root starts with a tilde, the tilde gets passed through glob() first β€” lil glow-up before the real work ✨

Almost every dist gets built with one GatherDir plugin, because it's lowkey the easiest way to get files from disk into your dist. Most users just need:

[GatherDir]
[PruneCruft]

...and boom, that picks up all the files from the current directory into the dist. πŸ‘‘

heads up: PruneCruft is needed here to drop files that might present as build artifacts but should NOT be shipped. do not skip it, that would be a tragedy 😭

You can use it multiple times β€” as you can any other plugin β€” by giving it a plugin name. for example, if you want to include external specification files into a subdir of your dist, you might write:

[GatherDir]
; this plugin needs no config and gathers most of your files

[GatherDir / SpecFiles]
; this plugin gets all the files in the root dir and adds them under ./spec
root   = ~/projects/my-project/spec
prefix = spec

two GatherDirs, one dist, main character energy only 🌈

πŸ’œ PERL VERSION πŸ’œ

This module should work on any version of perl still receiving updates from the Perl 5 Porters. meaning: any version released in the last two to three years. (like, if the most recently released version is v5.40, then this module works on both v5.40 and v5.38.) it's giving "we keep it fresh" 🧚

Although it may work on older versions of perl, no guarantee is made that the minimum required version will not be increased. the version may be increased for any reason, and there is no promise that patches will be accepted to lower the minimum required perl. so don't come for us with a v5.8 patch, bestie, it's not gonna slay πŸ’€

πŸ‘‘ ATTRIBUTES πŸ‘‘

root

This is the directory where we look for files. if you don't give it one, it defaults to the dist root β€” generally, the place where your dist.ini or other configuration file lives. it can start with ~ (or ~user) to mean your (or some other user's) home directory. and if it's a relative path, it's relative to the dist root. home sweet home 🏠

prefix

Set this to place the gathered files under a particular directory. there's a whole example up in the description if you wanna see it in action. ur files, new home, cute πŸŽ€

include_dotfiles

By default, files will not be included if they begin with a dot. this goes both for files and for directories relative to the root. like, dotfiles are shy, they get left out πŸ™ˆ

In almost all cases, the default value (false) is correct. so just... leave it alone, okay?

By default, symlinks pointing to directories will not be followed; set follow_symlinks = 1 to traverse these links as if they were normal directories. going where no plugin has gone before πŸ”₯

In all followed directories, files which are symlinks are always gathered, with the link turning into a normal file. no cap, they get fully converted, no symlink baggage left behind.

exclude_filename

To exclude certain files from being gathered, use the exclude_filename option. the filename is matched exactly, relative to root. this may be used multiple times to specify multiple files to exclude. one bullet per ex, k bye πŸ’…

exclude_match

This is just like exclude_filename but it takes a regular expression pattern instead. filenames matching the pattern (relative to root) are not gathered. this may be used multiple times to specify multiple patterns to exclude. regex girlies, this one's for you 🌸

prune_directory

While traversing, any directory matching the regular expression pattern will not be traversed further. this may be used multiple times to specify multiple directories to skip. it's giving βœ‚οΈ "not you, not today"


🌟 AUTHOR 🌟

Ricardo SIGNES 😏 <cpan@semiotic.systems>

(the 😏 is literally in the original, i'm not adding attitude, the attitude was already there)

This software is copyright (c) 2026 by Ricardo SIGNES.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. slay, open source, periodt πŸ’–


and that's the whole page, bestie 🫢 this was Dist::Z...therDir(3) from the User Contributed Perl Documentation, perl v5.42.3, dated 2026-10-19 β€” go forth and gather, i'm obsessed ⭐🌺✨

πŸ“¦ where this page comes from