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

NAME

Data::Hive - convenient access to hierarchical data

VERSION

Version 0.052

SYNOPSIS

    use Data::Hive;

    my $hive = Data::Hive->NEW(\%arg);
    print $hive->foo->bar->baz;
    $hive->foo->bar->quux->SET(17);

METHODS

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

NEW

arguments:

  • store

    A Data::Hive::Store object, or an object that implements its get, set, and name methods.

  • 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_args

    Arguments to instantiate $store with. Mutually exclusive with the store option.

GET

Retrieve the value represented by this object's path from the store.

GETNUM

GETSTR

Soley for Perl 5.6.1 compatability, where returning undef from overloaded numification/stringification can cause a segfault.

SET

  $hive->some->path->SET($val);

Set this path's value in the store.

NAME

Returns a textual representation of this hive's path. Store-dependent.

ITEM

  $hive->ITEM('foo');

Return a child of this hive. Useful for path segments whose names are not valid Perl method names.

EXISTS

  if ($hive->foo->bar->EXISTS) { ... }

Return true if the value represented by this hive exists in the store.

DELETE

  $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.

AUTHOR

Hans Dieter Pearcey, <hdp at cpan.org>

BUGS

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.

SUPPORT

You can find documentation for this module with the perldoc command.

    perldoc Data::Hive

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

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.