NAME

Kvasir::Engine - Analysis worker

INTERFACE

CLASS METHODS

new

Creates a new worker.

INSTANCE METHODS

add_rule ( $rule )

Adds a rule to the worker.

add_pre_hook ( $callback )

Adds a new hook that is run before every iteration.

add_post_hook ( $callback )

Adds a new hook that is run after every iteration.

run ( $work_callback )

Runs the worker.

Actions

actions

Returns the names of all registered actions.

has_action ( NAME )

Checks if the engine has a registered action with the given NAME.

add_action ( NAME => ACTION )

Registers the ACTION as NAME in the engine.

Hooks

hooks

Returns the names of all registered hooks.

has_hook ( NAME )

Checks if the engine has a registered hook with the given NAME.

add_hook ( NAME => HOOK )

Registers the HOOK as NAME in the engine.

add_pre_hook ( NAME )

Adds the hook with the given NAME to the list of hooks to run before each iteration.

add_post_hook ( NAME )

Adds the hook with the given NAME to the list of hooks to run after each iteration.

Inputs

inputs

Returns the names of all registered inputs

has_input ( NAME )

Checks if the engine has a registered input with the given NAME.

add_input ( NAME => INPUT )

Registers the INPUT as NAME in the engine.

Outputs

outputs

Returns the names of all registered outputs

has_output ( NAME )

Checks if the engine has a registered output with the given NAME.

add_output ( NAME => OUTPUT )

Registers the OUTPUT as NAME in the engine.

Rules

rules

Returns the names of all registered rules

has_rule ( NAME )

Checks if the engine has a registered rule with the given NAME.

add_rule ( NAME => OUTPUT )

Registers the OUTPUT as NAME in the engine.

add_rule_action ( NAME => ACTION )

Connects the rule NAME to the action ACTION.

rule_order

Returns a list of names matching the rules in the order they'll be evaluated.

set_rule_order ( LIST )

Sets which order the rules should be evaluated. The list should be the names of the rules.