Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked

Re^4: How do "you" make a tree in perl

by stvn (Monsignor)
on Sep 29, 2004 at 15:12 UTC ( #395006=note: print w/replies, xml ) Need Help??

in reply to Re^3: How do "you" make a tree in perl
in thread How do "you" make a tree in perl

I share your chagrin about lack of tests, but having seen that knowledgeable people like merlyn and perrin use it, I feel confident that it must not be as bad as you may think.

While I have the plenty of respect for merlyn and perrin and their collective experience, I don't take their choices on blind faith (that is not say that you are). I also know that Tree::DAG_Node seems to have been (for the most part) the only choice out there (the last version of Tree::DAG_Node was released in 2001 and the first version was released in 1998). Tree::DAG_Node does a lot too (IMO it tries to do too much), and I am sure people were reluctant to have to implement that themselves, so it was better to just use it, however that doesn't mean that it was always the best choice.

And as for the lack of tests, for me this was the deal breaker. The application for which I originally developed Tree::Simple used tree structures as a fundemental component which was at the lowest levels of the application. I needed a n-ary tree which was well tested and that I was confident would work as I needed it to. Tree::DAG_Node just did not fit this description for me.

A simple example that makes me love this module:

I agree with you, I simultaniously like and dislike how much you can do with Tree::DAG_Node. It is all good functionality, but I think its too much packed into one module. My goal with Tree::Simple is to provide all the same functionality (and more) but with a more modular and flexible design. Tree::Simple::VisitorFactory is inteneded to be a means of adding functionality which really does not belong in Tree::Simple, while Tree::Simple::View is intended to help keep the display layer seperate (it has an HTML and DHTML version, and I am working on a Tk version too). I also working on a Tree::Visualize module, which currently draws Tree::Simple and Tree::Binary trees in ASCII and with GraphViz in a number of layout styles (top-down like DAG_Node does, as well as others).

IMO all these things should be in seperate modules, not all squished into one.


Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://395006]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2023-12-05 20:48 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (27 votes). Check out past polls.