> > I thought mentioning the OnStart handler for db connection was
> great. Perhaps add a $dbh = undef or whatever in the OnEnd handler
> to disconnect? (I know you have the cleanup rollback there... but is
> that different?)
> >
> > I'm sure there are some others but I can't think of them right now!
> >
>
> Thanks.  Its a good point for memory freeing.  I just added
> it to the example.

This begs a big question that was answered somewhat indirectly:
Where do you create the database connection?

Due to the persistant nature of mod_perl (about which I am just learning),
It is important to get that right.  Is this every time the page hits, or that
the page is compiled, ie the first time this particular apache process runs
this script?

It seems that the best efficiency for a busy site would be to load a connection
up the first time an apache process loads the script, which should be safe, as
only one script at a time could use that reference.  OTOH, a lightly used site
would hold a lot of uneeded connections.

Another stle question:  I have an app that use a lot of variables like $bgcolor
and such so I can change just one spot, and it changes all over the
application.  $Application->{bgcolor} seems like a logical place to put it.

I assumed then, that Application_OnStart was the place to put definitions like
these; unfortunately, it didn't seem to work, even when I killed apache
altogether and restarted.
What should I do?


--
David Morton                           (620) 342-9297
Vice President                         [EMAIL PROTECTED]
Osprey Network Technologies, Inc.
1015 Scott
Emporia, KS 66801



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to