Hello,

is it possible to have two instances/versions of the same app under
mod_perl? I was hoping that something like this would do what I wanted
but it didn't:

<VirtualHost *:80>
  # the production instance
  ServerName myserver.dyndns.org

  <Perl>
    use lib '/www/app/myapp';
    $MyApp::CAP::Base::basedir='/www/app/myapp';
  </Perl>
</VirtualHost>

<VirtualHost *:80>
  # development
  ServerName test.myserver.dyndns.org

  <Perl>
    use lib '/www/app/myapp_test';
    $MyApp::CAP::Base::basedir='/www/app/myapp_test';
  </Perl>
</VirtualHost>
<Location /myapp>
# Handlers for the app go here
</Location>

The problem seems to be that the modules are read only once since the
namespaces are the same under myapp and myapp_test and there don't seem
to be per virtual host copies of the modules. So, whatever is called
first wins -- or is my understanding wrong about what is going on here?

The only solution I found was a second apache and mod_proxy but I would
like to avoid that if possible.

Any other ideas what I could do?

Thanks
Michael

Reply via email to