perl-modperl mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Silva <>
Subject Re: Weird CGI Caching problem
Date Wed, 14 Apr 2004 17:07:36 GMT

I'd be interested to see how this would work though, given my original 
code post and your modifications.  The following code will cache the CGI 
parameters with Mod_perl.  Switching to CGI::Simple was the only 
solution that I could find.

   use CGI;
   my $counter;

   sub run{
     my $cgi = shift;
     print "Content-type: text/plain\r\n\r\n";
     print "HERE";
     $counter = 0;
     for (1..5) {

   sub increment_counter{
     my $str=$cgi->param("name");
     print "Name=$str Counter is equal to $counter !\r\n";
   use strict;
   require "./";
   my $cgi = CGI->new();

Perrin Harkins wrote:

> On Fri, 2004-04-09 at 12:00, Jeremy Silva wrote:
>>The simple answer, is to not use the default module, but instead 
>>use the CGI::Simple module instead.  From what I've read, it is faster 
>>than the default CGI module.
> Glad to hear CGI::Simple is working for you.'s mod_perl support
> is somewhat tricky, because it uses a lot of global variables.  However,
> it does work.  If it didn't work for you, it was probably due to a
> scoping problem somewhere in your code, like an unintentional closure. 
> If you have further problems with apparent caching, look for something
> like that.
> - Perrin

Report problems:
Mail list info:
List etiquette:

View raw message