On Tue, 12 Dec 2000, Gerald Richter wrote:
> >
> > Where is declared that $PerlRequire?
> >
>
> Inside a Perl section..., so PerlRequire inside the Perl Section triggers
> perl_section_self_boot, which calls perl_section, which executes the
> PerlRequire inside the Perl section....
>
> I think you see what I mean...
Yes, that Perl section forms your real startup script and now that the
mod_perl config engine is fully reentrant your $PerlRequire was recursing
into perl_section before the original %ApacheReadConfig was cleaned.
> > Can you please try this in both perl_cmd_module and perl_cmd_require:
> >
> > #ifdef PERL_SECTIONS
> > else {
> > - if(CAN_SELF_BOOT_SECTIONS)
> > + if(CAN_SELF_BOOT_SECTIONS && !perl_sections_self_boot)
> > perl_section_self_boot(parms, dummy, arg);
> > }
> > #endif
> >
>
> That seems to be right fix that I was searching for today morning, just
> didn't see it. With this change it works :-)
>
> Maybe it would be better to insert a
>
> if(perl_sections_self_boot)
> return ;
>
> at the top of perl_section_self_boot, but I didn't tried that.
I think the better is to include it in the macro definition in mod_perl.h:
#ifdef PERL_SECTIONS
# ifndef PERL_SECTIONS_SELF_BOOT
# ifdef WIN32
-# define PERL_SECTIONS_SELF_BOOT getenv("PERL_SECTIONS_SELF_BOOT")
+# define PERL_SECTIONS_SELF_BOOT \
+ (getenv("PERL_SECTIONS_SELF_BOOT")&&!perl_sections_self_boot)
# else
-# define PERL_SECTIONS_SELF_BOOT 1
+# define PERL_SECTIONS_SELF_BOOT !perl_sections_self_boot
# endif
# endif
#endif
And document the fact that only the true directives PerlModule and
PerlRequire can trigger the scan of the %ApacheReadConfig namespace but
not $PerlModule nor $PerlRequire.
Anyway %ApacheReadConfig:: isn't documented in the main docs, and that is
the main reason that many people are using long <Perl>...</Perl> sections
that can be sustituted by a simple and cleaner "PerlRequire foobar".
Regards
Salvador Ortiz
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]