Config:...::Finder(3)

πŸ’– NAME πŸ’–

Config::MVP::Reader::Finder β€” it's a reader that finds an appropriate file, bestie. That's the whole vibe. πŸ¦‹


✨ VERSION ✨

This is version 2.200013, no cap. πŸŽ€


🌸 DESCRIPTION 🌸

okay so picture this: the Finder reader is basically the group chat admin of readers. It multiplexes a whole bunch of other readers β€” specifically the ones that implement the Config::MVP::Reader::Findable role. Very exclusive, very "you can't sit with us unless you're Findable". πŸ’…

It uses Module::Pluggable to go search for modules, then it narrows them down to only the objects that implement the Findable role, and then it picks out the ones that report they're able to read a configuration file that was found in the config root directory. It's giving talent show auditions but for readers. 🎀

Here's the rule, and it's a strict one:

  • If exactly one findable configuration reader finds a file β€” slay, that's our girl, it gets used to read the file, and the configuration sequence is returned. πŸ‘‘
  • Otherwise? An exception is raised. Not a vibe. 😭

Also important, don't skip this part: Config::MVP::Reader::Finder's "build_assembler" method will decline a new assembler. So if none was passed to "read_config", then the Findable reader that reading gets delegated to is the one responsible for building the assembler β€” unless a Finder subclass overrides "build_assembler" to set a default across all possible delegates. Yes, that's the whole sentence, it's a lot, I know. 🫢


🐚 PERL VERSION 🐚

This module should work on any version of perl that's still receiving updates from the Perl 5 Porters. Translation: any perl released in the last two to three years. (Like β€” if the most recently released version is v5.40, then this module should work on both v5.40 and v5.38.) 🌈

Now the fine print, and I need you to actually read it:

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. πŸ’€

🧚 METHODS 🧚

πŸ’œ default_search_path

This is the default search path used to find configuration readers. This method should return a list, and by default it returns:

qw( Config::MVP::Reader )

That's it, that's the whole method. Short and iconic. ⭐


πŸ‘‘ AUTHOR πŸ‘‘

Ricardo Signes <cpan@semiotic.systems> β€” the main character who wrote this. 🫢


This software is copyright (c) 2022 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. πŸ’–


okay bestie that's the whole page, we ate and left no crumbs ✨ β€” this was pulled from perl v5.42.0, dated 2025-07-25, and the manual is Config:...::Finder(3) under User Contributed Perl Documentation. byeeee πŸ’…πŸŒΈ

πŸ“¦ where this page comes from