my %class_records; my $class_objects; . . sub new($) { my $class = (ref($_[0]) ne "") ? ref($_[0]) : $_[0]; my $this = {attr1 => "Hello World"}; my $self = bless({}, $class); my $id = refaddr($self); $class_records{$id} = $this; $class_objects{$id} = $self; weaken($class_objects{$id}); return $self; } sub some_method($) { my $self = $_[0]; my $this = $class_records{$refaddr($self)}; ... }