This module will index a Tree::Simple hierarchy so that node's can be quickly accessed without needing to search the entire heirarchy. It currently will index the Tree::Simple nodes by their UID property. Plans for allowing other means of indexing are in the future.

This module will index a Tree::Simple hierarchy using the UID property of each tree node (fetched with the getUID method of Tree::Simple). This works well with the Tree::Simple::Manager's default tree file parser filter, which expects a tree file format which supplies an id field. It is obvious that this approach may not be useful in all cases, so I have built this module too easily allow for subclassing and customization of the indexing process.

You will need to override the indexTree method. The root tree is accessible by the getRootTree method, and the index is a hash reference available as a public field $self->{index}. How you choose to construct the index from here is up to you. Here are a couple of things to keep in mind though.