Posted on Wed Jan 25 15:43:37 2006
by jdheddenin response to 1674(See the whole thread of 7)
Re: InsideOut Singleton?
Correction. You don't need the sharing stuff. Just use:
package My::Class; {
use Object::InsideOut;
my $singleton;
sub new {
my $thing = shift;
if (! $singleton) {
$singleton = $thing->Object::InsideOut::new(@_);
}
return ($singleton);
}
}