[Catalyst] How to configure multiple Apps with mod_perl?

michael reece mreece at sacbee.com
Mon May 16 20:06:05 CEST 2005


This seems to fix it, and sri says he will work it into trunk:

Add the following lines to Dispatcher.pm's sub setup_actions:


   sub setup_actions {
      my ( $self, $comps ) = @_;

+    $self->actions(
+        { plain => {}, private => {}, regex => {}, compiled => [],  
reverse => {} }
+    );
+    $self->tree( Tree::Simple->new( 0, Tree::Simple->ROOT ) );
+
      for my $comp (@$comps) {
          $comp = ref $comp || $comp;


don't know if there is still a problem with attrcache ..


On May 13, 2005, at 7:16 PM, n.a wrote:

> I want to build multiple Catalyst applications in one host
> with apache/mod_perl(1.29).
>
>  It seems the memory reuse mechanism of mod_perl makes problem in this
> case.  Request for one application unintentionally maps to an  other
> application handler once in a while after several requests.
>
>
> Are there any way to avoid this?
>
>
> Just for a quick hack, I add following lines to my application classes
> to separate actions look up table among different Catalyst  
> applications.
>
> However I'm not sure if this is enough.
>
> BEGIN{
>     __PACKAGE__->actions({}),
>     __PACKAGE__->_attrcache({});
> }
>
>
> Version Info
>   Catalyst '5.10'
>   Apache-perl : 1.3.33-4 (debian package with mod_perl/1.29)
>   OS Linux/Debian Linux version 2.4.27-1-386
> --
> n.a at ad.wakwak.com
>
>
> _______________________________________________
> Catalyst mailing list
> Catalyst at lists.rawmode.org
> http://lists.rawmode.org/mailman/listinfo/catalyst
>




More information about the Catalyst mailing list