in reply to recursive creation of attached objects?
I'm trying to make a binary tree object which uses a recursively called new() method to create a tree n nodes deep
I would think that the basic interface is wrong. "new" should create a "virgin" tree. There should be another method to add leaves to this tree $bin_tree->add_leaf(...), perhaps? I would not use the "new" method for this purpose.
|
---|
In Section
Seekers of Perl Wisdom