good chemistry is complicated, and a little bit messy -LW |
|
PerlMonks |
Re: Creating 'universal' instances of objects?by smalhotra (Scribe) |
on Aug 04, 2003 at 13:57 UTC ( [id://280677]=note: print w/replies, xml ) | Need Help?? |
A couple of points:
1. The "universal" object you are trying to create is called a "singleton" (correct me if I'm wrong). Search PM or google for more information. Or look at singleton. 2. Although 'use'ing the modules specifically makes it easier for you and anyone else who looks at your code to see what's coming from where you might try to use one package to handle all these for you. Example: I hope this gives you an idea. $will->code for @food or $$;
In Section
Seekers of Perl Wisdom
|
|