On Thu, Oct 25, 2007 at 06:55:44PM +0200, Louis-David Mitterrand wrote:
> In my handler.pl I have:
> 
>       {
>               package HTML::Mason::Commands;
>               use CGI qw(-no_xhtml);
>               etc...
>       }
> 
> After restarting apache2, CGI.pm's start_html() function emits:
> 
>       <html lang="fr-FR"><head><title>My title</title>
> 
> But after a 3 reloads it starts emitting:
> 
>       <html xmlns="http://www.w3.org/1999/xhtml"; lang="fr-FR" 
> xml:lang="fr-FR">
> 
> Why would CGI.pm's behaviour suddenly change?

Following-up to myself, I found out that perl-5.8.8's CGI.pm resets 
$CGI:XHTML to 1 after the first apache request. I haven't dug up inside 
the code to check where or why but the fix is:

        sub handler {
        ....
    $CGI::XHTML = 0;
        ....
        }


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Mason-users mailing list
Mason-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-users

Reply via email to