Object-InsideOut - Re: InsideOut Singleton?

Posted on Wed Jan 25 15:43:37 2006 by jdhedden in 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); } }
Direct Responses: 1705 | Write a response