NAME

Simple::Trie - Trie, it's simple

VERSION

version 0.01

SYNOPSIS

$trie = Simple::Trie->new(words => [ qw(foo bar food) ] );

$trie->add('baz');
say "Found foo" if $trie->find('foo');
my @results = $trie->smart_find('f');

DESCRIPTION

This is an implementation of a Trie, but it's not very sophisticated. This was done
as a way for myself to become more aquainted with the algorithm described here

http://en.wikipedia.org/wiki/Trie

ATTRIBUTES

words

The current set of words during initializion.

METHODS

add($word)

Will add a word to the trie.

find($word)

Will return true if the word is found in the trie.

smart_find($letters)

Will return a list of found words that match.

SEE ALSO

Moo

AUTHOR

Logan Bell <loganbell@gmail.com>

COPYRIGHT AND LICENSE

This software is copyright (c) 2013 by Logan Bell.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.