Re: asynchronous execution, was Re: implementing a set of queue-processing servers

[email protected] (Perrin Harkins) Wed, 20 Nov 2002 17:18:33 -0500
Newsgroups perl.p5ee
Message-ID <[email protected]>
Aaron Johnson wrote:

> I know you _can_ , but I don't find it convenient.


For me it's pretty much the same as debugging a command-line script.  To 
debug a mod_perl handler I just do something like this:

httpd -X -Ddebug

Then I hit the URL with a browser or with GET and it pops me into the 
debugger.  I have httpd.conf set up to add the "PerlFixupHandler 
+Apache::DB" line when it sees the "debug" flag.

> I still don't like to give apache long processes to manage, I feel this
> can be better handled external of the server and in my case it allows
> for automation/reports on non-mod_perl machines.


I try to code it so that the business logic is not dependent on a 
certain runtime environment, and then write a small mod_perl handler to 
call it.  Then I can use the same modules in cron jobs and such.  It can 
get tricky in certain situations though, when you want to optimize 
something for a long-running environment but don't want to break it for 
one-shot scripts.

- Perrin