Hailo::Role::Engine - A role representing a L<Hailo|Hailo> engine backend


Hailo documentation Contained in the Hailo distribution.

Index


Code Index:

NAME

Top

Hailo::Role::Engine - A role representing a Hailo engine backend

ATTRIBUTES

Top

A Hailo::Engine::* gets the following attributes by using this role:

storage

A storage object the engine should use to get data from.

order

The current Markov order used by the storage object.

METHODS

Top

new

This is the constructor. It accept the attributes specified in ATTRIBUTES.

learn

Learn from the given input and add it to storage.

reply

Reply to the given input using the storad data.

AUTHOR

Top

Ævar Arnfjörð Bjarmason <avar@cpan.org>

LICENSE AND COPYRIGHT

Top


Hailo documentation Contained in the Hailo distribution.

package Hailo::Role::Engine;
BEGIN {
  $Hailo::Role::Engine::AUTHORITY = 'cpan:AVAR';
}
BEGIN {
  $Hailo::Role::Engine::VERSION = '0.69';
}

use 5.010;
use Any::Moose '::Role';
use namespace::clean -except => 'meta';

has storage => (
    required      => 1,
    is            => 'ro',
    documentation => "Our copy of the current Storage object",
);

has order => (
    required      => 1,
    isa           => 'Int',
    is            => 'rw',
    documentation => "Our copy of the current markov order",
);

requires 'learn';
requires 'reply';

1;