Blast-Radius Aware AI Code Review for Business-Critical Systems
LiveReview LiveReview Explore LiveReview

CLI::Framework::Command::Meta - Represent "metacommands" (app-aware commands)

Description

       This class is a subclass of CLI::Framework::Command.  It defines "metacommands", commands that are
       application-aware (and thus, implicitly aware of all other commands registered within the application).
       Metacommands have methods that set and retrieve a reference to the application within which they are
       running.

       This class exists as a separate class because, with few exceptions, commands should be independent of the
       application they are associated with and should not affect that application.  Metacommands represent the
       exception to that rule.  In the exceptional cases, your command will inherit from this one instead of
       "CLI::Framework::Command".

Methods

get_app()/set_app($app)
       Retrieve or set the application object associated with a metacommand object.

           $app = $command->get_app();

           $command->set_app( $app );

Name

       CLI::Framework::Command::Meta - Represent "metacommands" (app-aware commands)

See Also

       CLI::Framework::Command

       CLI::Framework::Application

perl v5.34.0                                       2022-06-11                 CLI::Framework::Command::Meta(3pm)

When To Build Metacommands Vs Regular Commands

       See tutorial advice on this topic.

See Also