Re: Weird CGI Caching problem

2004-04-14 Thread Perrin Harkins
On Wed, 2004-04-14 at 13:38, Perrin Harkins wrote: > # Counter.pm > > sub run { > my $cgi = shift; > print "Content-type: text/plain\r\n\r\n"; > print "HERE"; > my $counter = 0; > for ( 1 .. 5 ) { increment_counter(\$counter, $cgi); } > } > > sub increment_counter { > my (

Re: Weird CGI Caching problem

2004-04-14 Thread Perrin Harkins
On Wed, 2004-04-14 at 13:07, Jeremy Silva wrote: > The following code will cache the CGI > parameters with Mod_perl. It will cache them without mod_perl too, although you won't see it because your CGI will exit after each request. Your sub increment_counter() is a closure because it uses the $cg

Re: Weird CGI Caching problem

2004-04-14 Thread Jeremy Silva
Perrin, 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. JS mycounter.pl _ use CGI;

Re: Weird CGI Caching problem

2004-04-09 Thread Perrin Harkins
On Fri, 2004-04-09 at 12:00, Jeremy Silva wrote: > The simple answer, is to not use the default CGI.pm 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. CGI.pm's mod_perl suppo

Re: Weird CGI Caching problem

2004-04-09 Thread Jeremy Silva
All, Sorry for the barrage, but I found a solution to my cgi caching problem, using Apache2 and Mod_perl (under Win/ActiveState). The simple answer, is to not use the default CGI.pm module, but instead use the CGI::Simple module instead. From what I've read, it is faster than the default CGI

Re: Weird CGI Caching problem

2004-04-09 Thread Jeremy Silva
Perrin, Did both things you mentioned. I upgraded to the latest CGI for ActiveState and made the modification. I still get the same caching problem that I was getting before (try it on your own system). Is this a bug in Mod_perl? In my parent script, why don't I have control over the CGI ob

Re: Weird CGI Caching problem

2004-04-07 Thread Perrin Harkins
On Wed, 2004-04-07 at 17:03, Jeremy Silva wrote: >use CGI; >my $counter; >my $cgi; >sub run{ > print "Content-type: text/plain\r\n\r\n"; > print "HERE"; > > $counter = 0; > $cgi=null; You don't need to do this. Just pass the CGI object to your sub: m