I started learning Perl with the basics, then discovered and learned Moose, wrote an entire application with Moose, only to discover it had to run under mod_perl. So I throw my code up on the servers with mod_perl, and a whole bunch of stuff is going wrong. For one the session information is corrupted and things that were supposed to timeout aren’t — and just a whole bunch of other problems.
What generally needs to happen beyond say culling global variables to make a code function as intended in mod_perl? Does mod_perl play nicely with Moose? Are there any gotchas with Moose under mod_perl, or weird things generally from mod_perl I need to look out for?
One thing I’ve learned so far is that since the code is compiled and created in an Apache namespace, the global variables never actually get destroyed — and you have to clear them by initiating them =/
We’re using Moose with mod_perl quite happily.
I’ll bullet-point some context – it’s pretty common …
I can’t speak for memory leakage etc. We have MaxRequestsPerChild=1000, but I’ve never been anywhere where that wasn’t set to something sane.
Our test suite doesn’t touch Apache (Plack helps a lot).