[cgiapp] Lazy DBI
mark at rawcane.net
Thu Feb 14 05:59:28 EST 2008
Still getting up to speed on CGI::Application while redeveloping my app
along with your valuable help.
I am looking at the DBI plugin and would like to benefit from the lazy
The thing is the actual database calls will be made from other objects.
So I can put dbh_config in cgiapp_init but then how do I best get the dbh
when I need it?
I have been considering the various param options with your help via another
thread and am still considering my options but however I do that I don't
really want to be passing the CGI::Application into every new object just so
I can get to the dbh.
But (I may be wrong) if I create a dbh ref to pass around then I create a
connection and so lose out on the lazy loading.
Any advice on the best approach to this?
More information about the cgiapp