You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Eric Hastings <eh...@advertising.com> on 2000/04/13 19:17:41 UTC

Apache::RegistryLoader side effect

I have a plain-old CGI script configured to be loaded with Apache::Registry
 
<Location /cgi-bin/myscript.pl>
SetHandler  perl-script
PerlHandler Apache::Registry
Options ExecCGI
PerlSendHeader On
</Location>

In this configuration, I see the BEGIN block of my script get executed twice
per child process. If I add the line "PerlModule Apache::RegistryLoader" to
the httpd.conf file, this gets cut down to once per child process (which is
what I want!)  Is this behavior documented anywhere?  I have been scouring
Doub's book and other online resources for 2 days, and don't understand this
behavior.
 
(An aside:  All the docs talk about using
"Apache::RegistryLoader->new->handler(...)", and that works to make BEGIN
execute only once (I even tried it myself to be sure).  But nothing about
using RegistryLoader the way I am.  Am I doing something horribly wrong?)
 
Thanks.
E