Data::Hive::Store
Data::Hive::Store is a generic interface to a backend store for Data::Hive.
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.
print $store->get(\@path, \%opt);
Return the resource represented by the given path, however $store is structured. This could map to e.g.
$store
$hash->{foo}->{bar} $obj->get('foo.bar') io('/foo/bar')->all
depending on the Store module involved.
$store->set(\@path, $value, \%opt);
Analogous to get.
get
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.
io
/foo/bar
if ($store->exists(\@path, \%opt)) { ... }
Returns true if the given path exists in the store.
To install Data::Hive, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Hive
CPAN shell
perl -MCPAN -e shell install Data::Hive
For more information on module installation, please visit the detailed CPAN module installation guide.