Perl: the Markov chain saw | |
PerlMonks |
Re^2: Things I Don't Use in Perlby skx (Parson) |
on Aug 24, 2005 at 11:14 UTC ( [id://486153]=note: print w/replies, xml ) | Need Help?? |
I can see the argument against using Singletons just as global variables. But in many circumstances they are useful. The most obvious two situations I use them are in:
Passing a database handle to all methods, or to multiple objects gets sloppy fast - but having a single resource to fetch it from is neat. Similarly with debug files; although they are sometimes abused when you realise you need more than one logfile...
In Section
Meditations
|
|