[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cgiapp] Lazy DBI


Hi

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 loading idea.

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?

Thanks
Mark

#####  CGI::Application community mailing list  ################
##                                                            ##
##  To unsubscribe, or change your message delivery options,  ##
##  visit:  http://www.erlbaum.net/mailman/listinfo/cgiapp    ##
##                                                            ##
##  Web archive:   http://www.erlbaum.net/pipermail/cgiapp/   ##
##  Wiki:          http://cgiapp.erlbaum.net/                 ##
##                                                            ##
################################################################


Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.