Data::Tree::Describe - Create annotated versions of complex data trees
This module is in active development and has been uploaded simply as part of a standard and automated release procedure.
If you have any ideas for what would be helpful to implement, please contact the author!
use Data::Tree::Describe; my $data_object = {test=>['some','stuff']}; my $described_tree = Data::Tree::Describe->new($data_object);
This module was originally developed for data trees or objects created from json::maybexs, though it technically will work on any perl data tree.
The module is fairly heavy processing wise and recursively iterates through a tree determining the type for every node as well as other handy attributes such as how many children are in any HASH or ARRAY type.
Callable methods
Create a new annotated data tree
Takes 1 argument an $object
BEWARE large objects will take some time to be processed.
Return a list of all paths in the format: [element,element,element],[element,element]
Of the list returned, the first element [0] will always have a blank 'child name' as it is representative of the parent node.
Return a block of data starting from the point specified.
Accepts 1 argument; the path in the format of a list ['some_node',3,'element']
If you pass a blank or undefined list to the function it will return the entire tree, as it will presume you are selecting the root/base node.
Regarding bugs, featuire requests, patches, forks or other please view the project on github here https://github.com/PaulGWebster/p5-Data-Tree-Describe
Paul G Webster <daemon@cpan.org>
This software is copyright (c) 2020 by Paul G Webster.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Data::Tree::Describe, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Tree::Describe
CPAN shell
perl -MCPAN -e shell install Data::Tree::Describe
For more information on module installation, please visit the detailed CPAN module installation guide.