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


in reply to calling anonymous objects by their names

From your description, you almost certainly will want to build up a hash of your Node objects, using their names as a key so you can quickly recall them so as to perform the linkages. Your connect routine could still take their string names as arguments, but could then look them up in the hash, and call the appropriate methods on the retrieved objects.

Your general, high level algorithm will be as follows... Take the first line of your config file, split it up into individual node names, and for each name construct a Node object, set its name, and stuff the node object into the hash that you're keeping using the name as the key. Then for each subsequent line, split it into the "to" and "from" nodes, look those nodes up in your hash, and call the appropriate methods on them to form the connection.

Straightforward enough, neh?