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