You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Paul <yd...@yahoo.com> on 2000/11/27 17:58:33 UTC

replacing a directory specific legacy CGI

Good morning, gang.

As we migrate to mod_perl, we have one major CGI that is scattered all
over the site.  It is directory local and reads config files to adjust
its output. Currently we have one copy in cgi-bin and quite literally
hundreds of symlinks to it from all over the site.

We want to rewrite this in modperl, but I was concerned about the
memory usage of cacheing each local copy.  If we put all the pertinent
code into a single module and just make all the local versions call a
processing method, won't the actual working code still be retained in
the module namespace? Since the interpreter is embedded in the server,
that should mean that all the little cached versions are just something
like "sub handler { Module->method; }", right? It just has to compile
and store the hook?

Is that worth worrying about, or am I misinterpreting?
Many thanks, and happy holidays. =o)

__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/

Re: replacing a directory specific legacy CGI

Posted by "Randal L. Schwartz" <me...@stonehenge.com>.
>>>>> "Paul" == Paul  <yd...@yahoo.com> writes:

Paul> Good morning, gang.
Paul> As we migrate to mod_perl, we have one major CGI that is scattered all
Paul> over the site.  It is directory local and reads config files to adjust
Paul> its output. Currently we have one copy in cgi-bin and quite literally
Paul> hundreds of symlinks to it from all over the site.

Paul> We want to rewrite this in modperl, but I was concerned about the
Paul> memory usage of cacheing each local copy.

Huh?

If you're talking about using Apache::Registry, STOP.  Just write a
module, define it as the handler for each of those directory contents,
and you're done.

Apache::Registry is meant as a stopgap until you learn to write real
handlers.  You've just now graduated. :)

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<me...@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!