| VS-RuleEngine documentation | Contained in the VS-RuleEngine distribution. |
VS::RuleEngine::Rule - Interface for rules.
Called when a new instance is requested.
Evaluates the rule. Must return either KV_MATCH if the rule matched or KV_NO_MATCH if it didn't.
For arguments passed to this method see Arguments in VS::RuleEngine::Constants.
| VS-RuleEngine documentation | Contained in the VS-RuleEngine distribution. |
package VS::RuleEngine::Rule; use strict; use warnings; use Carp qw(croak); sub new { my $self = shift; $self = ref $self || $self; croak "new() should not be called as a function" if !$self; croak "Class '$self' does not override new()"; } sub evaluate { my $self = shift; $self = ref $self || $self; croak "evaluate() should not be called as a function" if !$self; croak "Class '$self' does not override evaluate()"; } 1; __END__