This is just an idea at the moment, and mainly I'm wondering if this kind of thing already exists?
I'm debugging a mod_perl app just now, so I'm using Apache::Reload to allow me to edit modules and have them automatically reload without having to restart the server. Works very nicely, except when a module has associated class data. The data are all lost when the module reloads, so I end up having to restart the server after all. Partly I'm addressing this by refactoring some code out into modules that have no class data. The logical extension to this would be to provide a module that stores class data for other classes, so there's only ever one module that is really storing any class data. I'm thinking that a client module could set and retrieve its classdata into the helper class, which does a lookup based on the caller to locate the caller's class data, which it returns. Then I can safely mess with the code in the caller and not lose its class data. I generally use Class::Data::Inheritable to manage class data, and my first thought would be to base this thing on that, so it might be called Class::Data::Inheritable::Separated, or else just Class::Data::Separated. Is this wheel already spinning somewhere? Cheers, d. -- Dr. David R. Baird Riverside Content Management Systems http://www.riverside-cms.co.uk