Re: mod_perl and global %Live_Objects not being initialized

[prev] [thread] [next] [Date index for 2004/11/19]

From: Andy Grundman
Subject: Re: mod_perl and global %Live_Objects not being initialized
Date: 02:03 on 19 Nov 2004
Perrin Harkins wrote:
> Sorry I'm a bit slow on this one guys; I was busy at ApacheCon.
> 
> William is correct, the behavior is intentional and it will never cause
> problems unless you have references to these objects sticking around
> somewhere in globals or closures.  I run Class::DBI in mod_perl all the
> time and never have problems with this.

Hmm, so if I did not have this kind of reference (which I must 
somewhere), the Class::DBI object would be completely destroyed after 
each request right?

> As stated above, it is not intended to be re-initialized on each
> request.  It should last for the life of your program, regardless of
> whether that program is mod_perl or a command-line script.

I'm confused on what you mean by "life of your program".  In my case it 
is lasting for the entire life of the Apache child, causing stale data 
problems.  If my app was bug-free it would only last one request.  My 
question is simply that if it is lasting for one request anyway, what's 
the harm in initializing it to protect sloppy coders like me? :)

Thanks,
-Andy

(message missing)

Re: mod_perl and global %Live_Objects not being initialized
Andy Grundman 02:03 on 19 Nov 2004

Re: mod_perl and global %Live_Objects not being initialized
=?ISO-8859-1?Q?Ask_Bj=F8rn_Hansen?= 03:02 on 19 Nov 2004

Generated at 17:31 on 15 Feb 2005 by mariachi v0.52