pajout has asked for the wisdom of the Perl Monks concerning the following question:

Situation: More than 1 mod_perl application running under Apache. And these legacy aplications (for some reasons, for instance db-structure x module dependency) want to use the same modules (which are proprietary, not installed into standard perl paths), but different versions.
I know that this is against perl style, but, I would appreciate it. I can play with 'use lib' or @INC, but, once module loaded, I cannot support it transparently.
Does somebody solved some similar problem? Could some smart OO style help?

Replies are listed 'Best First'.
Re: issues with module versions
by philcrow (Priest) on Oct 06, 2005 at 13:49 UTC
    I think you have several options. We often run different mod_perl apps on the same box using separate httpd.confs and separate apache instances. Though ours don't, each of those confs could include different use lib paths. This seems cleanest (to me).

    Phil

      Thanx for answer, we use this way too ;0) But it consumes more memory - apache childs, db connections etc...
        You're right it will consume more memory, but most of this memory is shared (well, in *nix land it is, even in some OSes have problems reporting shared memory).

        You can reduce the number of apache children (and db connections) you need per application by running a simple lightweight proxy in front.

        -- More people are killed every year by pigs than by sharks, which shows you how good we are at evaluating risk. -- Bruce Schneier