VS::RuleEngine::InputHandler - Handles input retrieval
package MyApp::Rule; use base qw(VS::RuleEngine::Rule); # ... constructors etc ... sub evaluate { # Retrieve the current input handler for the executing engine my ($input) = @_[KV_INPUT]; # Retrieve the current value from the input 'some_input' if ($input->get("some_input") > 10) { return KV_MATCH; } return KV_NO_MATCH; }
This class handles input retrieval for an engine. It should not be instanciated by users.
Creates a new input manager for the given INPUTS. INPUTS must be a list of key/value pairs.
Retrieves the value from the input whose name is INPUT. If the input does not exist an exception is thrown. Passes any extra arguments to the inputs value function as KV_ARGS.
Sets the local data for the manager.
Sets the global data for the manager.
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.