Dancer2...sConfig(3)
β¨ NAME β¨
Dancer2::Core::Role::HasConfig β it's the role that holds all the config of a Dancer2 App π (you'll also see it filed under Dancer2...sConfig(3) in the User Contributed Perl Documentation, iykyk)
π VERSION π
version 2.2.1 β fresh, iconic, current β¨
π DESCRIPTION π
okay so bestie, listen. This role hands you a config attribute, and that's literally the thing you use to read the configuration. π«Ά
Here's the little plot twist: the very first time you touch it, it calls a method called _build_config(). And that method? it has to be implemented by the class that's using this role β no skipping, no shortcuts, it's giving main character responsibility. π€
What should _build_config() give back? The whole config β the entire thing, the full vibe β the one that's been created by running one or more ConfigReader packages. All of them. Together. That's the assignment. π
It also gives you a setting() method, and that one is supposed to be used by externals β so things outside your app β to read and write config entries. Yes, read and write. She does both. π
πΈ ATTRIBUTES πΈ
config
Returns the whole configuration. That's it, that's the whole job, and she ate. π
π¦ METHODS π¦
settings
Alias for config. Literally equivalent to <<$object->config>>. Same energy, different name. π
setting
Get or set an element from the configuration. Read it, write it, whatever you need β she's flexible like that. β¨
has_setting
Verifies that a key exists in the configuration. The vibe check for your keys β does it exist or not, bestie, we're about to find out. π
π AUTHOR π
Dancer Core Developers β the legends themselves. π«Ά
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2026 by Alexis Sukrieh.
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, and also legally binding. π
no cap, that license part is the real deal β same terms as Perl 5 itself, fr fr. π
and that's the whole page, bestie!! πβ¨ this one's from perl v5.42.3, dated 2026-09-20 β go forth and configure your heart out, ily ππ¦π
π¦ where this page comes from
- fedora 44: perl-Dancer2 2.2.1-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