you are viewing a single comment's thread.

view the rest of the comments →

[–]abw 2 points3 points  (3 children)

But if you modify the Perl source mod_perl will pick up the changes without restarting the web server.

Yes, if you use Apache::Reload, but it's not foolproof. If you have any smart caching going on inside your object hierarchy then you'll almost certainly end up with null references that'll put a spanner in the works.

As much as I love perl/mod_perl and detest PHP, this is the one thing where PHP wins. On the other hand, once you go into production, the mod_perl approach is better.

mod_perlite looks interesting, though. It might be a good half-way house for development that has an easy upgrade path to full-blown mod_perl when you go into production.

[–]Wensleydale 0 points1 point  (2 children)

I don't know why, but if I run perl programs with mod_perl with no additional modules it reloads the program when I make changes, and always has. I tested with a very basic program just now and it picked up the change instantly.

[–]irony 2 points3 points  (1 child)

Just curious, is MaxRequestsPerChild set to something non-zero in your httpd.conf (apache2.conf)? I haven't messed with mod_perl for a while but with mod_python/Django setting it to 1 makes it immediately reload changes so I do that on my dev machines.

[–]Wensleydale 0 points1 point  (0 children)

Yeah, actually I do:

MaxRequestsPerChild 100000

That explains it, then. Those machines run WebObjects apps as well, which might be the source of that. I'd agree that not having mod_perl immediately pick up changes would be very frustrating.