perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From André Warnier>
Subject Re: Bug with cgi->header() + mod_perl ?
Date Sat, 14 Feb 2009 10:50:00 GMT
Patrick Galbraith wrote:

Less nice, less neat, less classic, terrible style, whatever you want, 
but which also works :

# my nifty cgi-bin

use strict;
use warnings;

package MyOwn;

no strict;
$CGI = '';


sub sub1 {

$MyOwn::CGI = new CGI();


sub sub2 {

my $name = $MyOwn::CGI->param('name');


I am not quite sure why it works, and I would appreciate if some 
mod_perl guru could explain it.  But it seems to, for years now.  Each 
invocation of the cgi-bin seems to get its own private copy, without 
mixups nor warnings.
But maybe it's not thread-safe and I'm just very lucky ?

View raw message