in reply to Re: Things I Don't Use in Perl
in thread Things I Don't Use in Perl
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...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Things I Don't Use in Perl
by exussum0 (Vicar) on Aug 24, 2005 at 19:43 UTC |