in reply to Re: Refresh a Module
in thread Refresh a Module
Obviously (for me) you must respect the contract, when replacing code in a live system.
Regarding data, there is a reason why languages like Haskell require their functions to be "pure", i.e. to have no side effects or inner states.
Regarding Perl modules, a reload would need to handle not only functions, but also with package variables being used outside the module and/or lexical closure variables carrying state.
I could think of a solution with a proxy module shadowing all this, but this l also depends on the concrete requirements.
And practicality is different for development and production scenarios..
Last but not least, I can't really comment on OO frameworks. If their inner workings make it impossible to make data persistent, there is not much which can be done.
Cheers Rolf
(addicted to the Perl Programming Language :)
see Wikisyntax for the Monastery
|
|---|