Claes Jakobsson > VS-RuleEngine-0.09 > VS::RuleEngine::Action::SetLocal

Download:
VS-RuleEngine-0.09.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

VS::RuleEngine::Action::SetLocal - Generic action to set key/value pairs in the local object

SYNOPSIS ^

  use VS::RuleEngine::Declare;
  
  my $engine = engine {
      # input_1 and input_2 will be set to the local object (KV_LOCAL)
      # every time this action is invoked
      action 'set_properties' => instanceof "VS::RuleEngine::Action::SetLocal" => with_args {
          'input_1' => 5,
          'input_2' => -5,
      }
  }

DESCRIPTION ^

This is a generic action that sets key/value pairs to the local object. Any existing value for a given key will be overwritten.

USAGE ^

Rule arguments

This rule expects a hash as its argument, which is what with_args provides, where the key is the name of the key to set and the value is its value.

SEE ALSO ^

VS::RuleEngine::Action::SetGlobal

syntax highlighting: