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::Cmd::Result

SYNOPSIS

  # Usually received from a App::vaporcalc:Role::UI::Cmd consumer

DESCRIPTION

An object representing the result of an App::vaporcalc::Role::UI::Cmd consumer's execution.

ATTRIBUTES

action

The action the controller should take; must be a "CommandAction" in App::vaporcalc::Types.

prompt

The prompt to display when "action" eq 'prompt'

prompt_callback

An optional callback that should be run with the answer given to "prompt" (or "prompt_default_ans" if no answer is given).

See "run_prompt_callback".

prompt_default_ans

A default answer for use by "run_prompt_callback" if none is given.

recipe

The App::vaporcalc::Recipe to attach for "action" eq 'recipe'

resultset

The App::vaporcalc::RecipeResultSet to attach for "action" eq 'display'

METHODS

run_prompt_callback

Runs "prompt_callback" with $_ and $_[0] set to either the given argument or "prompt_default_ans" if none given.

AUTHOR

Jon Portnoy <avenj@cobaltirc.org>