Subject: | using multiple CGI::Application files under mod_perl fails |
Having two or more CGI::Applications that use CAP::ActionDispatch fails
when another App is using the same process that other App has used
before. I was able to trace this to CAP::ActionDispatch::Attributes-file
and there to init function.
The patch that I've included seems to fix this issue for me.
Subject: | Attributes.pm.diff |
12c12
< my $init = 1;
---
> my %inited; # Allow multiple CGI::Applications to be inited separately in mod_perl enivironment
42,43c42
< return unless $init; # Initialize only once
<
---
> my $class;
45c44,45
< my $class = $attr->[0];
---
> $class = $attr->[0];
> next if( exists $inited{$class});
51c51
< $init = 0;
---
> $inited{$class}++; # Mark our caller class inited now, so that it can be skipped on next run