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

Re: calling anonymous objects by their names

by NetWallah (Canon)
on Jul 25, 2003 at 22:40 UTC ( #277999=note: print w/replies, xml ) Need Help??


in reply to calling anonymous objects by their names

I agree with skyknight's method - just wanted to OO-ify it a bit.

Refer to "Class Data" in perltoot. You can store you %nodelist in the class (Not individual objects). Your object "new" method adds an object reference by doing:

$nodelist{$NewObjectName}=$self;
Your "connect" method can then easily access a named object and do something like:
$self->{LEFT_LINK} = $nodelist{$NameOfLinkedNode};

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2023-01-28 10:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?