Re: [approved] Re: Newbie - should I even be trying?!

2003-02-06 07:36:37
On February 6, 2003 at 12:43, Gunnar Hjalmarsson wrote:

Bill Whitacre wrote:
This sounds great!  Will it run under Apple's 'stock' OS X 'mod_perl' 

mod_perl? Haven't thought about it. As regards, I think it 
would (possibly after a couple of minor fixes),

As long as your script does not depend on the processing terminating
to clean things up (e.g. closing filehandles), should
be okay under mod_perl.  It can be invoked via the Apache::Registry
module via server configuration to provide a CGI-like environment.

You may want to add a package statement at the beginning of
to make sure it runs in a different namespace than main.  I believe
Apache::Registry will run code under a random namespace, but it is
better to be explicit.

Since would stay loaded, mhonarc::initialize() only needs
to be called once, but I think there is no real harm if it is called

but I don't know whether 
MHonArc itself is mod_perl ready. Earl?

MHonArc is coded to supported embedded usage (via
and have the ability to processing multiple archives (sequently)
in a single process, so I believe MHonArc should be okay.  However,
I would definitely do some test runs to see that things work as
expected and to monitor memory usage.  After an archive is processed,
the internal data structures will still be present until the next call
to mhonarc::process_input().  Therefore, a memory footprint will stay
around until Apache reaps the child process.

Don't you have the option to run it as a plain CGI script?

He should since he is using Apache.  If is only going
to be invoked occassionaly, traditional CGI invocations should be
sufficient and it makes sure that things get "cleaned" up properly.


To sign-off this list, send email to majordomo(_at_)mhonarc(_dot_)org with the