in reply to Re^5: Getting mod_perl to actually 'activate'..
in thread Getting mod_perl to actually 'activate'..

Hm, I think I see the problem now, or at least the 'correct question to ask'.

See, currently in CGI, the code uses SelfLoader to only serve up the needed subs. in mod_perl, I had assumed that all of the subs would have to be loaded, so they could precompile.

Is there another way? and could you give me the first couple steps of that 'way' (assuming one exists), so I can try it on?
  • Comment on Re^6: Getting mod_perl to actually 'activate'..

Replies are listed 'Best First'.
Re^7: Getting mod_perl to actually 'activate'..
by perrin (Chancellor) on Feb 16, 2009 at 18:40 UTC

    You were right the first time: under mod_perl you want them all to compile on the first hit, so don't use SelfLoader IF you use ModPerl::Registry or a mod_perl handler rather than PerlRun. If your MaxRequestsPerChild is set pretty high, it will rarely recompile.

    If you have to use PerlRun, you're stuck with things like SelfLoader, since it will compile every time.

Re^7: Getting mod_perl to actually 'activate'..
by zwon (Abbot) on Feb 16, 2009 at 18:11 UTC

    IIRC you can use SelfLoader with Registry. Or you can use AutoLoader.