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

App::vaporcalc::Role::UI::PrepareCmd

SYNOPSIS

package MyCmdEngine;
use Moo;
with 'App::vaporcalc::Role::UI::PrepareCmd';

package main;
use List::Objects::WithUtils 'array';
use App::vaporcalc::Recipe;
my $recipe = App::vaporcalc::Recipe->new(
  # See App::vaporcalc::Recipe
);
my $cmdeng = MyCmdEngine->new;
my $cmd = $cmdeng->prepare_cmd(
  recipe  => $recipe,
  verb    => 'set',
  subject => 'nic base',
  params  => array('36'),
);

DESCRIPTION

A Moo::Role for producing vaporcalc command objects.

ATTRIBUTES

cmd_class_prefix

The prefix to use when constructing command object class names from a given subject.

Defaults to App::vaporcalc::Cmd::Subject::

METHODS

prepare_cmd

Takes a App::vaporcalc::Recipe, an optional verb (action to perform), a subject (used to find/build command objects), and an optional set of parameters (as an ARRAY or ARRAY-type object). See "SYNOPSIS".

AUTHOR

Jon Portnoy <avenj@cobaltirc.org>