The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

ControlFreak::Command - turn string commands to method calls

METHODS

process(%param)

Process a command from string and call either the ok or the err callback with optionally a status string.

%param has the following keys

  • cmd

    The actual command string to process.

  • ok_cb

    The callback called when the command executed successfully.

  • err_cb

    The callback called when the command failed.

  • has_priv

    A boolean that if set gives access to the entire set of commands.

  • ctrl

    The controller.