How do I get mod_perl to recognize changes to my application? How do I get mod_perl to recognize changes to my application? apache apache

How do I get mod_perl to recognize changes to my application?


I just read a nice blog post that sums up all possible ways to achieve this: How not to restart mod_perl servers by Jonathan Swartz


What exactly is the other developer changing?

To reload modules when they have changed you would use Apache2::Reload. (Though see Performance Issues before thinking about using this in production.)

Even without that, mod_perl will reload cgi scripts when they change; I don't know of any way the other developer could have turned that off if you are talking about cgi scripts.


Since it's just for development, how about just killing all of the child processes and letting the parent apache process respawn?

kill -9 $(ps axf | grep httpd | egrep -e ' S ' | cut -b1-5 | paste -s -d ' ')
  • The above command works for me on my box in my environment, your mileage will vary.

It's not an elegant solution by any means, but hey, it's faster than a full apache restart.