I'm having a problem with Mod_perl 2.0 that I cannot seem to find any help on.

I found some help on Mod Perl's caching (http://bulknews.net/lib/mod_perl_guide/porting.html)
and tested some of his scripts. I was having some problems in some of my conversions, so I decided to modify his scripts to see if the problem persisted.


mycounter.pl
_________________
  use CGI;
  my $counter;
  my $cgi;
  sub run{
    print "Content-type: text/plain\r\n\r\n";
        print "HERE";
        
        $counter = 0;
        $cgi=null;
        $cgi=CGI->new;
    for (1..5) {
      increment_counter();
    }
                $cgi=null;

  }
  sub increment_counter{
    $counter++;
        my $str=$cgi->param("name");
    print "Name=$str Counter is equal to $counter !\r\n";
  }
  1;


counter.pl _____________ use strict; require "./mycounter.pl"; run();



From a browser, I've passed in some name and then have tried changing it. It seems as though Apache2 is keeping the CGI parameters cached in memory for every run. My question is, how do I make sure I get the latest CGI object from Apache? As you can see, I've tried changing the cgi parameter to null (and everything else).


JS



-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html



Reply via email to