http://qs321.pair.com?node_id=290680

zigdon has asked for the wisdom of the Perl Monks concerning the following question:

In starting to work on a new (largish) project, we're trying to make some basic design decisions. In the past, I've always seperated all the SQL code to methods in the Database object, in hopes that it would make it easier to update in case the database design changes.

The problem is that now any code that needs to use the database object is loading a lot of code that it doesn't need.

So my question, O esteemed monks, is should I continue to use this method (perhaps with autoloading methods as needed, for increased speed), or is it considered "better" to have each object (User object, Item object) carry it's own SQL code?

Thanks for any advice!

-- zigdon