... specifically I'm trying to run multiple copies of a Catalyst application under the same Apache server with different config files.
Does anyone have any strategies for running the same set of perl modules against an arbitrary external file?
You can't do this, because mod_perl shares the namespaces in use amongst all Apache processes. That means $MyApp::foo is global.
Unless Catalyst is being very, very clever and not using any global or class variables at all. It's possible, but quite difficult as it involves rebuilding lots of things on each request. (random act of guesswork)
This sort of thing is easy with PHP, though.
-Dom
Re:Out of luck
malte on 2005-07-04T17:39:29
Actually this is very easy. Put everything that is shared in the same namespace, put everything that isnt in different namespaces.
Ok, its not that easy, but you get a lot of saves memory for it. You should be alright, if you control all apps and test them together
:) Re:Out of luck
Dom2 on 2005-07-04T17:45:48
But the different namespaces are still shared. You need some initial thing to point it at the individual namespace that it should be using. For example,<Location/MyApp1>
PerlSetVar MyAppPackage My::App1
PerlHandler My::App
</Location>
<Location/MyApp2>
PerlSetVar MyAppPackage My::App2
PerlHandler My::App
</Location>But I still reckon it's easy to break, particularly when compared to PHP's shared nothing philosophy.
-Dom
Re:Catalyst already supports this?
LTjake on 2005-07-05T10:16:57
Thank you, but, i don't think that thread is talking about the same issue. I want the same application running twice, and that thread is about multiple applications on the same apache.