On Fri, Aug 6, 2010 at 8:09 PM, Randal L. Schwartz <mer...@stonehenge.com>wrote:
> >>>>> "Amit" == Amit Saxena <learn.tech...@gmail.com> writes: > > Amit> I am working on a tree implementation (with any number of parent > Amit> and child nodes) in perl. Every node is defined as a object of a > Amit> "Node" class which I have created as a ".pm" module. > > Unless this is for a student exercise, you probably just want to look at > Graph in the CPAN. Lots and lots and lots of graph traversal things > already worked out for you. > > -- > Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 > <mer...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/> > Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc. > See http://methodsandmessages.vox.com/ for Smalltalk and Seaside > discussion > Thanks Randal for the reply. The purpose of this activity is to model a hierarchical representation of dependent components, each of one will be represented as a service. I had a look at the Graph module ( http://search.cpan.org/~jhi/Graph-0.94/lib/Graph.pod) but I am not sure how it can be used to implement multiple parent and multiple child implementation of a tree. In other words, I would like to have similar methods which are available in the "Tree" implementations in CPAN. Please suggest. Thanks & Regards, Amit Saxena