Data::Hive - convenient access to hierarchical data
Version 0.052
use Data::Hive; my $hive = Data::Hive->NEW(\%arg); print $hive->foo->bar->baz; $hive->foo->bar->quux->SET(17);
Several methods are thin wrappers around required modules in Data::Hive::Store subclasses. These methods all basically call a method on the store with the same (but lowercased) name and pass it the hive's path:
EXISTS
GET
SET
NAME
DELETE
arguments:
store
A Data::Hive::Store object, or an object that implements its get, set, and name methods.
get
set
name
store_class
Class to instantiate $store from. The classname will have 'Data::Hive::Store::' prepended; to avoid this, prefix it with a '+' ('+My::Store'). Mutually exclusive with the store option.
$store
store_args
Arguments to instantiate $store with. Mutually exclusive with the store option.
Retrieve the value represented by this object's path from the store.
Soley for Perl 5.6.1 compatability, where returning undef from overloaded numification/stringification can cause a segfault.
$hive->some->path->SET($val);
Set this path's value in the store.
Returns a textual representation of this hive's path. Store-dependent.
$hive->ITEM('foo');
Return a child of this hive. Useful for path segments whose names are not valid Perl method names.
if ($hive->foo->bar->EXISTS) { ... }
Return true if the value represented by this hive exists in the store.
$hive->foo->bar->DELETE;
Delete the value represented by this hive from the store. Returns the previous value, if any.
Throw an exception if the given store can't delete items for some reason.
Hans Dieter Pearcey, <hdp at cpan.org>
<hdp at cpan.org>
Please report any bugs or feature requests to bug-data-hive at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Data-Hive. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-data-hive at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Data::Hive
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Data-Hive
CPAN Ratings
http://cpanratings.perl.org/d/Data-Hive
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Data-Hive
Search CPAN
http://search.cpan.org/dist/Data-Hive
Copyright 2006 Hans Dieter Pearcey, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
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.