szabgab has asked for the wisdom of the Perl Monks concerning the following question:
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Singleton
by merlyn (Sage) on May 18, 2005 at 15:47 UTC | |
|
Re: How to create a singleton class ?
by diotalevi (Canon) on May 18, 2005 at 17:22 UTC | |
|
Re: Singleton
by Fletch (Bishop) on May 18, 2005 at 15:50 UTC | |
|
Re: How to create a singleton class ?
by brian_d_foy (Abbot) on May 18, 2005 at 17:06 UTC |