APM: Database wrapper classes

Wayne Walker wwalker at bybent.com
Tue Aug 13 09:48:57 CDT 2002


On Tue, Aug 13, 2002 at 09:38:16AM -0500, Hrunting wrote:
> On Tue, 13 Aug 2002, Wayne Walker wrote:
> 
> : Hi Everyone,
> : ...
> :         delete($id)
> :         get($id)
> 
> That is the best way.  Hide the logic behind the middle layer.  What I
> like to do is create a generic *::DBI class that inherits from DBI and
> stores the information for connecting to the database I need (through
> methods like *::DBI->connect() or *::DBI->connect_ro()) and have the
> wrapper classes use that (so they don't have to know anything about
> user/pass information, etc.
> 
> If I ever need to do more complex work than my wrapper classes allow, I
> just use the *::DBI class to pull my database connection and do the
> work manually.
> 
> Generally, if I'm doing complex SQL outside of my wrapper classes, it's
> for specific queries that aren't handled well by a wrapping model.

Rats! I have one vote for "there's not a better way Wayne, suck it up
and quit being lazy"
:)

Someone out there got a better/different solution?

> _______________________________________________
> Austin mailing list
> Austin at mail.pm.org
> http://mail.pm.org/mailman/listinfo/austin

-- 

Wayne Walker



More information about the Austin mailing list