in reply to How to create a singleton class ?
I'd personally have said ... unless defined $obj but that's just me. Other than that it should work fine as a barebones singleton. Class::Singleton provides hooks for initialization of the instance by subclasses, but that's not much harder.
|
|---|