[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [approved] Re: Newbie - should I even be trying?!
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'
> > implementation?
>
> mod_perl? Haven't thought about it. As regards mhastart.pl, 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), mhastart.pl 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 mhastart.pl
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 mhastart.pl would stay loaded, mhonarc::initialize() only needs
to be called once, but I think there is no real harm if it is called
repeatedly.
> but I don't know whether
> MHonArc itself is mod_perl ready. Earl?
MHonArc is coded to supported embedded usage (via mhamain.pl)
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 mhastart.pl is only going
to be invoked occassionaly, traditional CGI invocations should be
sufficient and it makes sure that things get "cleaned" up properly.
--ewh
---------------------------------------------------------------------
To sign-off this list, send email to majordomo@mhonarc.org with the
message text UNSUBSCRIBE MHONARC-USERS
[Index of Archives]
[Bugtraq]
[Yosemite News]
[Mhonarc Home]