in reply to Re^2: replace object methods at runtime
in thread replace object methods at runtime

Maybe, you can use Class::StateMachine. It lets you define several implementations for the same method and then select which one to use based on an internal "state" property.

Internally, it uses a reblessing approach very similar to the one exposed by DrHyde below.

  • Comment on Re^3: replace object methods at runtime