agianni has asked for the wisdom of the Perl Monks concerning the following question:
I have a config class for my Web application, and for a number of reasons, I think it would be useful to make it a singleton class. Unfortunately, it's already set up, has a standard interface and inherits from Class::Accessor. I know about Class::Singleton, but it doesn't look like there would be any easy way to take an existing class and make it a singleton class with that.
Short of encapsulating my current config object in a new singleton class, can anyone suggest a way to accomplish this?
perl -e 'split//,q{john hurl, pest caretaker}and(map{print @_[$_]}(joi +n(q{},map{sprintf(qq{%010u},$_)}(2**2*307*4993,5*101*641*5261,7*59*79 +*36997,13*17*71*45131,3**2*67*89*167*181))=~/\d{2}/g));'
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Making an Existing Class a Singleton
by halley (Prior) on Jan 23, 2008 at 17:13 UTC | |
Re: Making an Existing Class a Singleton
by kyle (Abbot) on Jan 23, 2008 at 16:54 UTC | |
by friedo (Prior) on Jan 23, 2008 at 16:57 UTC | |
by moritz (Cardinal) on Jan 23, 2008 at 17:06 UTC | |
by agianni (Hermit) on Jan 23, 2008 at 18:26 UTC | |
Re: Making an Existing Class a Singleton
by salva (Canon) on Jan 23, 2008 at 17:46 UTC | |
by exussum0 (Vicar) on Jan 24, 2008 at 16:13 UTC | |
by salva (Canon) on Jan 24, 2008 at 16:24 UTC | |
by exussum0 (Vicar) on Jan 24, 2008 at 17:51 UTC | |
by salva (Canon) on Jan 24, 2008 at 21:57 UTC | |
| |
by yoda54 (Monk) on Mar 18, 2010 at 08:39 UTC | |
Re: Making an Existing Class a Singleton
by pmccool (Initiate) on Jan 25, 2008 at 09:54 UTC |
Back to
Seekers of Perl Wisdom