MasonX-Maypole - Re: multiple MasonX::Maypole apps

Posted on Mon Feb 28 12:32:03 2005 by davebaird in response to 152 (See the whole thread of 2)
Re: multiple MasonX::Maypole apps

I have it running multiple apps in separate vhosts, but there should be no problem in principle running multiple locations within a host. But some more detail would be useful, like relevant bits of your Apache conf and Maypole app classes.

There may also be some interaction between Apache::MVC::parse_location, which uses the Location parameter in your Apache config, and other bits of MasonX::Maypole, your app code, and the templates, which seem to use $self->config->uri_base as a synonym. There is a parse_location method in the docs for MasonX::Maypole that you can use to override the Apache::MVC method. Just a hunch, might be worth trying or just for thinking about.

The things you are trying are in the area I would be looking at first as well. The main idea for multiple apps is to set up an empty config structure during initialisation, before any of the application-specific code gets loaded, so that each app can then inherit its own copy of the (empty) config, and then modify it locally, rather than setting up a race where the first app to get initialized, ends up setting the configuration inherited by all apps. Class data are stored using Class::Data::Inheritable, which has this behaviour.

Write a response