in reply to Leashing DBI

I consider this a judgement call.

Problems with SQL in code:

Problems with abstracting SQL:

My preference is that, for a large application, there should be a single module dealing with each data entity in your database (e.g. invoice.pm for invoices) and this module should provide interfaces to SQL to access data from that table. The perl and SQL are combined in the same module.

No outside module should access the data structures other than through this module. This is database centric however and can be tricky to map onto OO.

"The future will be better tomorrow."