App::Sp...Command(3)
hey bestie π welcome to the App::Sp...Command(3) page from the User Contributed Perl Documentation. This is the role that commands and subcommands both use β shared main character energy, periodt. π«Ά
β¨ NAME β¨
App::Spec::Role::Command β commands and subcommands both use this role. That's the whole vibe: they both show up and use this role. No cap, it's literally the shared role. π«Ά
π οΈ METHODS π οΈ
Vibe check: here are all the methods, in order, with all the deets. β¨
π
read
Calls load_data, build, load_plugins, init_plugins. That's it β it's giving βrun the whole little pipeline.β β¨
π± build
This builds a tree of objects. Literally a tree. Like:
my $self = App::Spec->build(%$hashref);
my $self = App::Spec::Subcommand->build(%$hashref);
π load_data
my $spec = App::Spec->load_data($file);
Takes a filename as a string, a filehandle, a ref to a YAML string or a hashref. So many forms, all valid, no cap. π
π default_plugins
Returns ('Meta', 'Help'). Those two. Iconic. π
π¦ has_subcommands
Returns 1 if there are any subcommands defined. Just one, bestie β not a whole essay. π
π₯ init_plugins
Initialize plugins. Yep, that's the whole description, and it understood the assignment. β¨
π load_plugins
Loads the specified plugin modules. Plugins? Loaded. Slay. π
π§ plugins_by_type
my $p = $cmd->plugins_by_type->{Subcommand};
Here's the call shape for grabbing plugins by type. iykyk. π
πΈ ATTRIBUTES πΈ
The attributes are lowkey the accessories of this role β here's every single one. πΈ
π class
Specifies the class which implements the app. Main character class energy, fr fr. β¨
π op, description, markup, name, options, parameters, plugins, subcommands
Accessors for specification items. All of them. Every single one. No skipped faves. π
mwah π β this page came from perl v5.42.0, dated 2025-03-26, and the footer title is App::Sp...Command(3). bye bestie, go build something cute π«Ά
π¦ where this page comes from
- opensuse-leap 16.0: perl-App-Spec 0.15.0-bp160.1.1 Β· 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