Hi Stas. The documentation is neither unclear nor confusing. However, the implication was not obvious (well... not obvious enough) when I first read this section three years ago. If you're sincere about wanting suggestions, here's mine:
In addition to understanding the behavior of END blocks in Apache::Registry scripts, a script writer must realize that any module invoked via "use" or "include" may work differently than its designer intended, if that module contains END blocks. -Jim On Fri, 12 Jul 2002, Stas Bekman wrote: > Jim Schueler wrote: > > I just read the fine print: Apache::Registry runs BEGIN subroutines just > > once per child process, but END routines run every time a script is run. > > The implication is that an otherwise robust module may behave unexpectedly > > when it's imported by an Apache::Registry script. Doesn't this cause > > problems for mod_perl users? There is no mention of this issue in either > > mod_perl_to_cgi or mod_perl_traps. > > > > Admittedly, most of the code in my END subroutines should probably be > > refactored into OO DESTROY subroutines anyways. But if not burned, I've > > been significantly scalded by this belated realization. > > > > I don't see anything on CPAN that can be easily applied to all of the > > modules that written. I'll happily fill that void, but I must be > > overlooking the obvious solution. Can anyone provide any insights? > > Please read: > http://perl.apache.org/release/docs/1.0/guide/porting.html#END_blocks > > The special case is for registry scripts that include END blocks. If the > the explanation at the above URL is unclear/confusing, please suggest > how to improve it. > > __________________________________________________________________ > 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 >