Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris

Re: calling anonymous objects by their names

by perrin (Chancellor)
on Jul 25, 2003 at 21:38 UTC ( #277984=note: print w/replies, xml ) Need Help??

in reply to calling anonymous objects by their names

I think what I'm trying to do is build an anonymous object, set its name attribute, and then use the name attribute to call methods on it.

Well, what difference does it make to your program what the thing is called? You can deal with references, since you are creating the objects. I would probably either change the config format or parse it and generate some kind of tree structure. Then you just walk down the tree, adding the child nodes as you go. It might call for a recursive function. I've had good luck with Tree::DAG_Node and its walk_down() method.

  • Comment on Re: calling anonymous objects by their names

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (3)
As of 2023-02-08 03:47 GMT
Find Nodes?
    Voting Booth?
    I prefer not to run the latest version of Perl because:

    Results (40 votes). Check out past polls.