The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

Data::Hive::Store

DESCRIPTION

Data::Hive::Store is a generic interface to a backend store for Data::Hive.

METHODS

All methods are passed at least a 'path' (arrayref of namespace pieces). Joining the path in a way that is meaningful is most of the point of the Store modules.

get

  print $store->get(\@path, \%opt);

Return the resource represented by the given path, however $store is structured. This could map to e.g.

  $hash->{foo}->{bar}

  $obj->get('foo.bar')

  io('/foo/bar')->all

depending on the Store module involved.

set

  $store->set(\@path, $value, \%opt);

Analogous to get.

name

  print $store->name(\@path, \%opt);

Return a store-specific name for the given path. This is primarily useful for stores that may be accessed independently of the hive; in the io example above, some external process/function may want to write to /foo/bar directly.

exists

  if ($store->exists(\@path, \%opt)) { ... }

Returns true if the given path exists in the store.