laziness, impatience, and hubris | |
PerlMonks |
Re: Avoiding global object handleby extremely (Priest) |
on Mar 26, 2002 at 22:21 UTC ( [id://154520]=note: print w/replies, xml ) | Need Help?? |
You know, there is a lot of good ideas posted already, but in your situation, I'd probably just pass around a hash full of objects. You could probably tie the hash to a meta_new that tries to create your object if it doesn't already exist, I suppose.
Whenever I catch myself passing a bunch of the same arguments to myriad subs, I stuff em into a hash and just pass it around. --
In Section
Seekers of Perl Wisdom
|
|