What's wrong with this code ?
package Sing; use strict; use warnings; my $obj; sub new { my ($class) = @_; $obj = bless {}, $class if not $obj; return $obj; } 1;
In reply to How to create a singleton class ? by szabgab
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |