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.
In reply to Re: Singleton
by Fletch
in thread How to create a singleton class ?
by szabgab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |