package A; my $obj = undef; sub new { my $class = shift; unless (ref $obj eq 'A') { # initilize object... $obj = bless \%self, $class; } return $obj; }