MooseX:...::Config(3)
π MooseX::App::Plugin::Config β config files for your MooseX::App apps, bestie π
okay so this is the MooseX::App::Plugin::Config page from the User Contributed Perl Documentation, and honestly? it's giving "let your app read a config file and slay." let's get into it π
β¨ SYNOPSIS β¨
first up, in your base class:
package MyApp;
use MooseX::App qw(Config);
option 'global_option' => (
is => 'rw',
isa => 'Int',
);
then over in your command class:
package MyApp::Some_Command;
use MooseX::App::Command;
extends qw(MyApp);
option 'some_option' => (
is => 'rw',
isa => 'Str',
);
now bestie, go make a config file (peep Config::Any for the deets) β a yaml file for example, like this:
---
global:
global_option: 123
some_command:
global_option: 234
some_option: "hello world"
and now the user can literally just call the program with a config file, no cap:
bash$ myapp some_command --config /path/to/config.yml
ate. periodt. π«Ά
πΈ METHODS πΈ
configβ reads the config filename, that's her whole job π_config_dataβ the full content of the loaded config file, every last crumb π
π SEE ALSO π
Config::Anyβ go look, iykyk β¨
that's the whole vibe, bestie. this page is perl v5.42.0, dated 2024-08-09, and it's the MooseX:...::Config(3) manual page β screaming, crying, throwing up, but make it config files π¦ππ
π¦ where this page comes from
- opensuse-leap 16.0: perl-MooseX-App 1.430.1-bp160.1.10 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms