Welcome to the Monastery | |
PerlMonks |
Re: Best Coding practiceby blue_cowdawg (Monsignor) |
on Dec 04, 2006 at 17:08 UTC ( [id://587697]=note: print w/replies, xml ) | Need Help?? |
I usually create a module that does the database connections and a few other housekeeping chores and then I create modules that are derivitaves of that one. Example: and I have variations on that theme that I use. Lately rather than use DBI for my database layer I use Class::DBI::Loader which further encapulates the databse layer for me using a similar method where I have a "parent" class instantiate the loader and the "child" classes inherit it from there. In fact I'm working on a major project now that uses that methodology and other than some interesting bugs I've discovered in the way Class::DBI::Loader reacts to certain table names I've not had any problems. Hope this helps... UPDATE:Special thanks to GrandFather for pointing out my fat-fingering Peter L. Berghold -- Unix Professional Peter -at- Berghold -dot- Net; AOL IM redcowdawg Yahoo IM: blue_cowdawg
In Section
Seekers of Perl Wisdom
|
|