App::Sp...Command(3)

πŸ“¦ version 0.15.0, in opensuse-leap 16.0

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