package A; sub new { my $class = shift; my $this = bless {}, $class; $this->{-twin} = new B(-twin => $this); return $this; } package B; sub new { my $class = shift; my $this = bless {@_}, $class; weaken $this->{-twin}; return $this; } $obj = new A; undef $obj;