Dist::Z...leFinder(3)

πŸ’– Dist::Zilla::Role::FileFinder(3) πŸ’–

okay so bestie, welcome to the User Contributed Perl Documentation, section 3, where we're talking about Dist::Zilla::Role::FileFinder β€” and yes, it's literally what it says on the tin. ✨


🌸 NAME 🌸

Dist::Zilla::Role::FileFinder β€” something that finds files within the distribution πŸ¦‹


⭐ VERSION ⭐

version 6.040 πŸ‘‘


πŸ’… DESCRIPTION πŸ’…

So a FileFinder plugin locates files within the distribution. That's the whole job. The reason this role even exists is so that sets of files can be easy-peasy described in one configuration section, and then used by one or more other plugin. Like, describe once, reuse everywhere β€” the way that efficiency is just chef's kiss. 😌

Plugins that implement this role must provide a find_files method. Here's the deal on that method:

  • It gets called with no arguments πŸ“ž
  • It must return an arrayref of files πŸ“¦
  • That arrayref should not be re-used, because it may be altered once it's returned. so like, don't hold onto it, bestie, it's not yours anymore πŸ’€

🧚 the example, because examples are everything 🧚

Imagine a simple glob-like FileFinder that expects configuration like this:

[Glob / RootModules]
glob = *.pm

This sets up a FileFinder named RootModules which will contain all pm files in the root directory. slay. πŸŽ€

Now another plugin that knows how to use FileFinder plugins might be configured like this:

[ModuleRelocator]
finder = RootModules
relocate_to = attic

🌈 rules of the game 🌈

Finders may operate on any rules they like β€” checking file size, content, name, or other properties. no gatekeeping here, whatever rules you want fr fr.

and listen: they should re-perform their "finding" on each call to find_files, because the files in the distribution may have changed. so no caching-and-forgetting, okay? the vibe check happens every time πŸ”₯


🐚 PERL VERSION 🐚

This module should work on any version of perl still receiving updates from the Perl 5 Porters. Which basically means it should work on any version of perl released in the last two to three years. (That is, if the most recently released version is v5.40, then this module should work on both v5.40 and v5.38.) 🌸

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 like, don't come for them about it πŸ™ˆ


πŸ‘‘ AUTHOR πŸ‘‘

Ricardo SIGNES 😏 <cpan@semiotic.systems> β€” icon, legend, the moment πŸ’œ


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. 🫢


and that's the whole page, bestie!! sign-off time: this lil doc is perl v5.42.3, dated 2026-10-19, and Dist::Zilla::Role::FileFinder(3) is out here being a whole entire mood. go find some files. periodt. πŸ’–βœ¨

πŸ“¦ where this page comes from