Just another Perl shrine | |
PerlMonks |
Re: Singletons and Inheritanceby bean (Monk) |
on Jul 20, 2004 at 21:29 UTC ( [id://376097]=note: print w/replies, xml ) | Need Help?? |
I personally think Singletons are silly. Why not just use package (class) variables? What's the point of being able to instantiate a class when you only want one instance (which you get for free with package variables)? If you must have Singletons, the way you've done it looks fine - it's a simple concept, it should be simple to implement.
But what's this about a database class for every table? That doesn't sound right...
In Section
Seekers of Perl Wisdom
|
|