Scroll to navigation

App::Spec::Role::Command(3) User Contributed Perl Documentation App::Spec::Role::Command(3)

NAME

App::Spec::Role::Command - commands and subcommands both use this role

METHODS

Calls load_data, build, load_plugins, init_plugins
This builds a tree of objects

    my $self = App::Spec->build(%$hashref);
    my $self = App::Spec::Subcommand->build(%$hashref);
    
    my $spec = App::Spec->load_data($file);
    

Takes a filename as a string, a filehandle, a ref to a YAML string or a hashref.

Returns ('Meta', 'Help')
Returns 1 if there are any subcommands defined.
Initialize plugins
Loads the specified plugin modules.
    my $p = $cmd->plugins_by_type->{Subcommand};
    

ATTRIBUTES

Specifies the class which implements the app.
Accessors for specification items
2025-03-26 perl v5.42.1