NAME

Cli::Router - Routes commands to their implementation

DESCRIPTION

If you want to "register" a new command, do it here. For more information about how an actual implementation should look like please refer to Wireguard::WGmeta::Cli::Commands::Command.

METHODS

route_command($ref_list_input_args)

Routes the cmd (first argument of @ARGV) to their implementation. The case of the commands to not matter. Any unknown command is forwarded to Wireguard::WGmeta::Cli::Commands::Help.

To add a new command add this to the for block:

/^your_cmd$/ && do {
        Wireguard::WGmeta::Cli::Commands::YourCmd->new(@cmd_args)->entry_point();
        last;
    };

Parameters

  • $ref_list_input_args Reference to @ARGV)

Returns

None