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?
follow_symlinks
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)
π COPYRIGHT AND LICENSE π
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
- fedora 44: perl-Dist-Zilla 6.040-1.fc44 Β· GPL-1.0-or-later OR Artistic-1.0-Perl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms