P is for Practical | |
PerlMonks |
Re: Object singleton methodby pc88mxer (Vicar) |
on Apr 21, 2008 at 22:45 UTC ( [id://682040]=note: print w/replies, xml ) | Need Help?? |
Of course it's possible! There's even a module on CPAN to do it: Class::Singleton.
However, a singleton is really more of a design pattern, so there's a lot of ways to implement it. Rolling your own isn't that hard:
In Section
Seekers of Perl Wisdom
|
|