On Wed, Jan 25, 2006 at 09:37:02AM +0100, Lars Balker Rasmussen wrote: > Hi, > > I've been trying to include some java-code in an existing Catalyst app, > which has caused me some trouble. I've tracked it down to a simple mod_perl > issue, the reason for which escapes me.
It appears that Inline::Java wasn't too pleased with mod_perl restarting during apache startup. So, splitting the "use Inline" call into a seperate .pl, and adding this code to the Handler module: use Apache2::ServerUtil (); my $cnt = Apache2::ServerUtil::restart_count(); if ($cnt > 1) { require "/home/lbr/LBR2.pl"; } fixed it - the java-stuff won't be initialised until mod_perl is stable, at the cost of having the Inline-stuff copied per httpd. Doing this at runtime, allowed me to readd the PerlLoadModule, so the rest of the app should be shared. Now the fun bit is finding a place in my catalyst app to add this code. Cheers, -- Lars Balker Rasmussen Consult::Perl