NAME

Data::Multihash - A hash table that supports multiple values per key.

SYNOPSIS

use Data::Multihash;

my $multihash = Data::Multihash->new();
$multihash->insert(key => 'value', key => 'other_value');
$multihash->insert(other_key => 'value');

print 'There are ' . $multihash->size . ' elements in the multihash.';

DESCRIPTION

This module implements a multihash, which maps keys to sets of values. Multihashes are unordered.

CONSTRUCTORS

new()

Create a new empty multihash.

INSTANCE METHODS

insert([list])

Insert key-value pairs.

elements($key)

Return all elements associated with a key.

size

Return the number of values in the multihash.