David Wheeler wrote:
Hi All,
I'm developing a new module for mod_perl 1.27, and I'm noticing that some code is getting executed twice when the Apache server starts up.
It was supposed to be fixed in 1.25_01:
=item 1.25_01 - July 6, 2001 ... fix double-loading bug of Perl{Require,Module}s at startup time Here is the diff: Index: Apache/Apache.pm =================================================================== RCS file: /home/cvs/modperl/Apache/Apache.pm,v retrieving revision 1.62 retrieving revision 1.63 diff -u -r1.62 -r1.63 --- Apache/Apache.pm 29 Jan 2001 16:07:08 -0000 1.62 +++ Apache/Apache.pm 26 Apr 2001 05:30:45 -0000 1.63 @@ -30,7 +30,10 @@ sub httpd_conf { shift; - push @Apache::ReadConfig::PerlConfig, + no strict 'refs'; + #use a symbolic reference so %Apache::ReadConfig:: + #is empty at compile time + push @{"Apache::ReadConfig::PerlConfig"}, map "$_\n", @_; } [...]
Indeed, that's the workaround that was added originaly to cure the above problem. Perhaps you can play with httpd_conf and see why it doesn't work for you. I know that several people have reported that they still had this problem since 1.26 was released.sub test_seen { return if $Apache::Server::Starting; $seen++; warn "Seen: $seen\n" }
__________________________________________________________________
Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/ mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org http://ticketmaster.com