Hans Dieter Pearcey > Data-Hive > Data::Hive::Store::Hash

Download:
Data-Hive-0.052.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Source  

NAME ^

Data::Hive::Store::Hash

DESCRIPTION ^

Simple hash store for Data::Hive.

METHODS ^

new

  my $store = Data::Hive::Store::Hash->new(\%hash);

Takes a hashref to use as the store.

get

Use given \@path as nesting keys in the hashref store.

set

See "get". Dies if you try to set a key underneath an existing non-hashref key, e.g.:

  $hash = { foo => 1 };
  $store->set([ 'foo', 'bar' ], 2); # dies

name

Returns a string, potentially suitable for eval-ing, describing a hash dereference of a variable called $STORE.

  "$STORE->{foo}->{bar}"

This is probably not very useful.

exists

Descend the hash and return false if any of the path's parts do not exist, or true if they all do.

delete

Descend the hash and delete the given path. Only deletes the leaf.