in reply to Re: How can I stop relying on a global variable?
in thread How can I stop relying on a global variable?

One thing I failed to mention: The function and the method are in different files. This code comprises a suite of modules working together. When writing modules, I normally don't like putting my methods in the same file as my functions. For example, this one particular method that alters the global hash belongs to a base class. And the function that checks the hash is exported by a module. Both the module and the base class are part of the application.
  • Comment on Re^2: How can I stop relying on a global variable?

Replies are listed 'Best First'.
Re^3: How can I stop relying on a global variable?
by Fletch (Bishop) on Feb 03, 2006 at 19:28 UTC
      Could you please elaborate? I have heard of "singleton classes" before but I don't know what they are. And how could one help me here?