However, a singleton is really more of a design pattern, so there's a lot of ways to implement it. Rolling your own isn't that hard:
package MyClass; my $instance; sub get_instance { unless ($instance) { $instance = ...; # instantiate instance here } $instance; }
In reply to Re: Object singleton method
by pc88mxer
in thread Object singleton method
by sh1tn
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |