in reply to On-the-fly module replacements : On topic - really
Maybe you can benefit from the approach described in the thread "Backing up" a subroutine during runtime. ?