You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Steve Smith <st...@isay.com.au> on 2000/06/17 09:41:54 UTC

mod_perl caches compiled quotes?

Hi,

I'm seeing some very disturbing behavior while running mod_perl.
I'm sure there must be a workaround for this.  Sorry if this is a FAQ,
but I haven't seen anything discussing this.

I use mod_perl to generate pages based on a user from cookies and a
database (DBI/MySql).  Use strict is in effect everywhere (I've
checked). I print this data using syntax of the form: 

    print qq( Your personal details are $name $salary);

(Simplified obviously, but you get the idea).  This works fine the
first time, but the person who accesses the page frequently gets the
details of the last person to access the server.  Needless to say this
is a Bad Thing.

Is it the case that the results of the string interpolation are cached
and used in the next run of the script?  This would seem to be the
case, as touching the script or restarting the server seems to remove
the problem, until the next run.

I've attached some version info below.

   Apache/1.3.12 (Unix) mod_perl/1.23 mod_ssl/2.6.3 OpenSSL/0.9.5
   Perl: 5.005_03
   Redhat6.1

However, I tried compiling up to the latest versions (including perl
5.6.0) on a development machine and saw the same behavior.

What am I doing wrong?

Thanks,
Steve


Re: mod_perl caches compiled quotes?

Posted by "G.W. Haywood" <ge...@www.jubileegroup.co.uk>.
Hi there,

On Sat, 17 Jun 2000, Steve Smith wrote:

> Sorry if this is a FAQ, but I haven't seen anything discussing this.

Then you haven't read the Guide:

http://perl.apache.org/guide

It's also in several other documents (the Eagle Book for one, and the
mod_perl Home page for another).

All of which you must also read.

Soon.

73,
Ged.