NAME

PogoIndex - Alternate hash class which can have plural values

SYNOPSIS

use PogoIndex;
$index = new PogoIndex::Btree;
$index->add('key', 'value1');
$index->add('key', 'value2');
@values = $index->getlist('key');  # gets ('value1', 'value2')

DESCRIPTION

By the Pogo's hash data structures (Pogo::Hash, Pogo::Htree, Pogo::Btree, Pogo::Ntree), each key may have only one value. This module provides multi-value available hash.

Methods

$obj = PogoIndex::Hash->new($size);

This class method makes and returns a PogoIndex::Hash object. It's substance is a hash reference which is tied to a Pogo::Hash object. $size specifies the size of hash entry table. $size can default.

$obj = PogoIndex::Htree->new($size);

Same as PogoIndex::Hash->new, but using Pogo::Htree.

$obj = PogoIndex::Btree->new;

Same as PogoIndex::Hash->new, but using Pogo::Btree.

$obj = PogoIndex::Ntree->new;

Same as PogoIndex::Hash->new, but using Pogo::Ntree.

$obj->add($key, $value);

This object method adds the value $value as a value of the key $key.

$obj->del($key, $value);

This object method deletes the value $value from the list of values of the key $key.

$obj->clear($key);

This object method deletes all values of the key $key. If $key defaults, the hash becomes empty.

@values = $obj->getlist($key);

This object method returns a list of all values of key $key.

$bool = $obj->have($key, $value);

This object method returns whether the key $key have the value $value.

@keys = $obj->keylist;

This object method returns a list of all keys.

AUTHOR

Sey Nakajima <sey@jkc.co.jp>

SEE ALSO

Pogo(3).

2 POD Errors

The following errors were encountered while parsing the POD:

Around line 94:

You forgot a '=back' before '=head2'

Around line 96:

'=item' outside of any '=over'