in reply to Re: Module vs Singleton
in thread Module vs Singleton
Actually, I had searched around and found Class::Singleton and had followed the documentation in that to work with the singleton objects. I was deriving from Class::Singleton. What you have explained is perhaps a simpler way of doing it without requiring the inheritance.
Also, it had never occurred to me that I could use modules for some of these instead of Singletons.
For example, if I had a set of utility functions, I created a Singleton class for it where a module perhaps would have been more appropriate.
It works. But perhaps it is not the right way and less efficient. Should I go back to clean this up and convert some of the Singletons to modules?
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Module vs Singleton
by Khen1950fx (Canon) on Jul 16, 2011 at 06:43 UTC | |
|
Re^3: Module vs Singleton
by locked_user sundialsvc4 (Abbot) on Jul 16, 2011 at 12:03 UTC | |
by Anonymous Monk on Jul 16, 2011 at 18:11 UTC |