in reply to mod_perl - ghost values

mod_perl keeps old values around between page invocations because it runs everything in one (or more) Apache processes. You can easily see if the problem becomes more treatable by launching Apache in single process mode:

httpd -X

Then, you should find that all visitors share the same shopping cart instead of wildly changing carts.

The most likely problem is failing to initialize global variables when you begin processing a page.

I recommend to move to all-lexical variables.

Replies are listed 'Best First'.
Re^2: mod_perl - ghost values
by rpike (Scribe) on Aug 19, 2014 at 16:07 UTC
    Thanks for the post Corion. All variables in the script are declared with 'my'. There were some variables that were declared as 'our' but have since changed to 'my'. I'm using my $q = new CGI() and using CGI::Session as well if that helps any. There are some additional modules as well but all variables inside them are also declared with 'my' except the 'our @ISA = qw(Exporter);' line.

      So, does running Apache in single process mode change anything?

      Also note that "single process" should also mean single-threaded.