VS::RuleEngine::Action::SetGlobal - Generic action to set key/value pairs in the global object
use VS::RuleEngine::Declare; my $engine = engine { # input_1 and input_2 will be set to the global object (KV_GLOBAL) # every time this action is invoked action 'set_properties' => instanceof "VS::RuleEngine::Action::SetGlobal" => with_args { 'input_1' => 5, 'input_2' => -5, } }
This is a generic action that sets key/value pairs to the global object. Any existing value for a given key will be overwritten.
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.
with_args
VS::RuleEngine::Action::SetLocal
To install VS::RuleEngine, copy and paste the appropriate command in to your terminal.
cpanm
cpanm VS::RuleEngine
CPAN shell
perl -MCPAN -e shell install VS::RuleEngine
For more information on module installation, please visit the detailed CPAN module installation guide.