VS::RuleEngine::Hook - Interface for hooks.


VS-RuleEngine documentation Contained in the VS-RuleEngine distribution.

Index


Code Index:

NAME

Top

VS::RuleEngine::Hook - Interface for hooks.

INTERFACE

Top

CLASS METHODS

new

Called when a new instance is requested.

INSTANCE METHODS

invoke

Runs the hook. Must return KV_ABORT (to abort processing) or KV_CONTINUE.

For arguments passed to this method see Arguments in VS::RuleEngine::Constants.


VS-RuleEngine documentation Contained in the VS-RuleEngine distribution.

package VS::RuleEngine::Hook;

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 invoke {
    my $self = shift;
    $self = ref $self || $self;
    croak "invoke() should not be called as a function" if !$self;
    croak "Class '$self' does not override invoke()";
}

1;
__END__