{ package C; sub doit { no strict 'refs'; local *{"A::doit"} = \&{"D::doit"}; shift->SUPER::doit; } }