http://qs321.pair.com?node_id=775702

bryank has asked for the wisdom of the Perl Monks concerning the following question:

Hi Monks,

I want to take a tab-delimited file, and create a tree out of it. This is a continuation on a similar question I had a week or two ago. Anyway, each line in the file contains parent child columns, in addition to properties that pertain to the child. When constructing the tree, I want all properties from a parent to inherit (ie., overide) the children properties (with the exception of node description). For example, if a parent node had a property of hidden, I'd want any children marked as such.

Here's an example -- below I have node ids (parent, child), followed by the title (description) of the child. After that are additional properties of child:

Parent Child Desc Property1 Property2 50 100 Apple hidden non-searchable 100 110 Granny Smith Visible searchable

So in the above example, node id 110, aka 'Granny Smith', would keep its description, but have its other properties overwritten by what was in node 100.

I'd also like a way to indicate if a node was overwritten by its parent. Perhaps as an additional property.

Any tips appreciated.