![]() |
|
go ahead... be a heretic | |
PerlMonks |
Re^4: Structure of a custom class (using Apache::Session)by jeyroz (Monk) |
on Jun 15, 2005 at 20:11 UTC ( #467042=note: print w/replies, xml ) | Need Help?? |
Ikagami, thanks again for your response! I am indeed passing $dbh into my class but the connection details are specified in the class itself. While it's convenient to use my existing db handle in this example, it won't always be available to pass. In that case I would certainly move the actual db connection into the class itself ... my fault for not stating that. Also, there is a possibility that the session data may not be stored in the same database that the application uses. In this case there would be a bit more information needed to establish the connection. I figured keeping this separate would save me some touble. Let me know if this still seems wasteful. I like your suggestion to simply override the constructor. author => jeyroz
In Section
Seekers of Perl Wisdom
|
|