|Don't ask to ask, just ask|
Of Mason, OO and DBHsby jimbus (Friar)
|on Oct 17, 2006 at 16:07 UTC||Need Help??|
jimbus has asked for the
wisdom of the Perl Monks concerning the following question:
I'm using apche2/mod_perl/mysql/mason to build web apps and have been follow the patterns, or some bastardization of the stuff found in the mason book. I've also been trying to follow a sort of MVC/OO format with my pages. I'm running into a mental snag as to what to do with the DBHs...
The mason book has you set up the dbh in the autohandler and then pass it as a parameter to the sub that will use it. But to my mind, this is definitely not a separation of display and business logic. My thought is I should be able to replace the code/db/whatever behind the module call without changing the stuff on the web side... but his way you have to change the web side to alter the DB.
Am I missing something, over thinking it...?
--Jimbus aka Jim Babcock
Wireless Data Engineer and Geek Wannabe