Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Avoiding global object handle

by extremely (Priest)
on Mar 26, 2002 at 22:21 UTC ( #154520=note: print w/ replies, xml ) Need Help??


in reply to Avoiding global object handle

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.

--
$you = new YOU;
honk() if $you->love(perl)


Comment on Re: Avoiding global object handle

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others chilling in the Monastery: (10)
As of 2014-08-20 21:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (124 votes), past polls