jithoosin has asked for the wisdom of the Perl Monks concerning the following question:
Hi monks,
Please forgive me if my doubt is too simple.I tried my best ,but not getting the answer.
I have a global hash ("our %hash") in package and the hash is used only in a function in that package. The function is accessed from different instances of an Module(Class). But each instance is creating it's own version of hash. Is there any way by which all instances use the same global hash rather than creating its own hash.
Let me make clear that the Module which is accessing the hash is different from the module which contains the hash
Thanks
Kiran
Please forgive me if my doubt is too simple.I tried my best ,but not getting the answer.
I have a global hash ("our %hash") in package and the hash is used only in a function in that package. The function is accessed from different instances of an Module(Class). But each instance is creating it's own version of hash. Is there any way by which all instances use the same global hash rather than creating its own hash.
Let me make clear that the Module which is accessing the hash is different from the module which contains the hash
Thanks
Kiran
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: global variable in a package
by ysth (Canon) on Jan 02, 2006 at 07:49 UTC | |
Re: global variable in a package
by mikeock (Hermit) on Jan 02, 2006 at 20:17 UTC |
Back to
Seekers of Perl Wisdom