You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Lincoln Stein <ls...@cshl.org> on 2002/08/07 05:30:32 UTC

Re: possible buget in CGI.pm

Did the fix that I sent out do the right thing?

Lincoln

On Wednesday 24 July 2002 05:30 am, Greg_Cope@sandwich.pfizer.com wrote:
> > From: mike808 [mailto:mike808@users.sourceforge.net]
> > Sent: 24 July 2002 05:54
> > To: Lincoln Stein; Cope, Greg; modperl@perl.apache.org
> > Subject: Re: possible buget in CGI.pm
> >
> > Lincoln, Greg, mod_perl list:
> >
> > The problem appears to be that the -no_xhtml option is only
> > processed in
> > _setup_symbols. This is called only during import() and
> > compile(), and sets $XHTML appropriately.
> >
> > However, $XHTML is reset to 1 in initialize_globals().
> > _reset_globals() is an
> > alias for this as well. initialize_globals() is called only
> > once in the
> > startup  execution (has a comment "Make mod_perl happy") of
> > the module.
> >
> > However, _reset_globals is called during new(), and is
> > registered with
> > mod_perl as a cleanup handler.
> >
> > What this means is that after the first execution, the
> > cleanup handler fires
> > and _reset_globals() is called, which calls
> > initialize_globals(), which then
> > sets the global $XHTML to 1. QED.
>
> Hi Mike,
>
> Thanks for the reply, we had got to a similar point as well (that
> initialize globals was stomping on it the second time round), but not is as
> much detail thanks for the explinatoin!
>
> Lincon, is this enough to go on?
>
> We've munged our install, which is not the ideal solution.
>
> Thanks everyone for thier time.  Lincon for the module, and Mike for the
> excellent explinatoin.
>
> The list is great, and support like this is an excellent factor in our
> internal push for more Open Source stuff!
>
> Greg
>
> <snippage>
>
>
> ----------------------------------------------------------------
> This message and any attachment has been virus checked by
> Pfizer Corporate Information Technology, Sandwich.
> ----------------------------------------------------------------