in reply to Is there a way to dynamically copy subroutine from one module to another?
{ package C; sub doit { no strict 'refs'; local *{"A::doit"} = \&{"D::doit"}; shift->SUPER::doit; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Is there a way to dynamically copy subroutine from one module to another?
by OlegG (Monk) on Feb 13, 2011 at 10:28 UTC |