package A; sub new { return bless {}, shift; } sub DESTROY { print ref(shift); } package B; use base 'A'; sub DESTROY { my \$self = shift; print ref(\$self); bless \$self, 'A'; } package main; my \$obj = B->new();
Reveal answer
Fill a bubble to check yourself