
VS::RuleEngine::Rule::InputUnderThreshold - Generic rule for checking input thresholds

use VS::RuleEngine::Declare;
my $engine = engine {
rule 'valid_name' => instanceof "VS::RuleEngine::Rule::InputUnderThreshold" => with_args {
'input_1' => 5,
'input_2' => -5,
}
}

This is a generic rule that checks if the value from an input is does not pass a threshold relative to 0. This can be used to model change matrices where a row represets a rule.
The following table shows the conditions when it matches
Input | Threshold | Result ------+-----------+------- x | 0 | match > y | y > 0 | no match > y | y < 0 | match < y | y < 0 | no match < y | y > 0 | match

This rule expects a hash reference as its argument, which is what with_args provides, where the key is the name of an input and the value is the expected threshold value.