Algorithm::MarkovChain::GHash - Object oriented Markov chain generator, glib/C storage


Algorithm-MarkovChain-GHash documentation Contained in the Algorithm-MarkovChain-GHash distribution.

Index


Code Index:

NAME

Top

Algorithm::MarkovChain::GHash - Object oriented Markov chain generator, glib/C storage

SYNOPSIS

Top

 use Algorithm::MarkovChain::GHash;

 my $mc = new Algorithm::MarkovChain::GHash;

See Algorithm::MarkovChain for full details

DESCRIPTION

Top

This module implements glib storage for Algorithm::MarkovChain.

You'll need glib installed to make this happy.

HISTORY

Top

This was originally written using Inline, but never released due to lack of round tuits. Recently a tuit supply arrived so I converted it into XS to reduce dependencies.

BUGS

Top

None known, maybe after I write some tests.

AUTHOR

Top

Richard Clamp <richardc@unixbeard.net>


Algorithm-MarkovChain-GHash documentation Contained in the Algorithm-MarkovChain-GHash distribution.

package Algorithm::MarkovChain::GHash;
use strict;
use Algorithm::MarkovChain;
use base 'Algorithm::MarkovChain::Base', 'DynaLoader';
use fields qw(_cstuff);
use DynaLoader;
use vars qw/$VERSION/;

$VERSION = 0.01;

bootstrap Algorithm::MarkovChain::GHash $VERSION;

sub new {
    my $invocant = shift;
    my $class = ref $invocant || $invocant;
    my __PACKAGE__ $self = $class->SUPER::new(@_);
    $self->{_cstuff} = _new_cstuff();
    return $self;
}

sub DESTROY {
    my $self = shift;

    $self->_c_destroy;
    #delete $self->{_cstuff};
}

1;