I should have also mentioned that not only does the "returned" come back
out of order there are also more than there should be. There's 3 calls
and 4 results.

Worse it now appears that if I hit the server long enough to come back
to the same process the value has stayed put. I assume this is why the
suggested use of $r->pnotes?

If so how do I get access to $r (which is shifted off early in the .pl)
when this is deep within a module (without a global that is)? This was
exactly the kind of problem I was striving (not very well) to solve in
the first place.

Matt.

> -----Original Message-----
> From: Perrin Harkins [mailto:[EMAIL PROTECTED]
> Sent: Thursday, 9 October 2003 2:22 PM
> To: Morton-Allen, Matt
> Cc: Matisse Enzer; [EMAIL PROTECTED]
> Subject: RE: Using class wide variables under mod_perl is safe?
> 
> On Wed, 2003-10-08 at 23:33, Morton-Allen, Matt wrote:
> > I am using Apache::DBI and would be at a loss without it (we use
Oracle
> > so the connection overhead is serious). With this in mind is it such
a
> > bad thing to hang on to the one handle for an execution?
> 
> No that's fine.  I suggest you do it with $r->pnotes(), so that you
can
> be sure it will be cleaned up at the end of the request.
> 
> > Secondly, I use the inherited object to achieve some other general
but
> > more complicated logic like logging and error handling which might
be
> > why it looked like overkill.
> 
> I still wouldn't use inheritance here.  Inheritance is not a good way
to
> add functions like this.  That's better done by making separate
packages
> and calling them, and saving inheritance for things where "is a"
> literally sounds right.  But I don't know the whole story with your
data
> model, so I won't lecture you about it.
> 
> > I assume that if I did continue to use inheritance then the
following
> > (after the inheritance was set up) would be the equivalent and that
the
> > fact it was inherited at the time will make no difference?
> >
> > my $parser = $self->get_parser();
> 
> Yes.
> 
> > There's newlines outputted at the very end of the execution so it's
> > confusing as to how the top line which is part of the process for
the
> > previous hit can be a) output after the newlines and b) output only
> > after the next request is made. I tried turning off buffering to no
> > avail.
> 
> This buffering is probably done by apache's logging functions.  I
don't
> think you can affect it.
> 
> - Perrin


Reply via email to