in reply to Problems with multiple inheritance

If you can't reproduce it in development, figure out what's different about your production server. Is it running the same version of perl? Does it have the same version of base.pm? Did you restart the server, or was it something like Apache::Reload that loaded the module?

Replies are listed 'Best First'.
Re^2: Problems with multiple inheritance
by agianni (Hermit) on Feb 23, 2007 at 17:37 UTC

    I'm running the same versions of perl and base. The production server has had the modules Apache::Reload-ed (I don't have control over restarting the server) and I was actually wondering if it might have had something to do with the fact that Apache::Reload doesn't necessarily reload things in any particular order, right? But I haven't had problems using mixin-type multiple inheritance like this in the past, and I'm doing very similar things that are also working just fine along side this new functionality, literally using the same base and mixin class, just extending them slightly differently in the concrete implementation class.

    I haven't used Apache::Reload in development because I have control over that server and I need to actually figure out how to get that working. We reload via script in production so I'm not intimately familiar with the process. I'll let you know if I can reproduce it that way, although I'm not hopefully, as I Apache::Reload-ed the modules on our QA servers which are identical to production and failed to reproduce the problem.

      Apache::Reload sounds like a red flag to me. Perl doesn't actually have any way to reload modules, so all that Apache::Reload does is delete it from %INC and require it again. In my opinion, it's crazy to use Apache::Reload in production. It will cause strange problems and will bloat the memory usage because it ruins copy-on-write sharing. It's meant for development only.
        The reason we're using Apache::Reload is because our servers are in a cluster behind a content switch and a rolling restart is complicated and can't be scripted as far as I know. So given the fact that we don't have access to restart the servers do you have any other recommendations?