Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re^4: Structure of a custom class (using Apache::Session)

by jeyroz (Monk)
on Jun 15, 2005 at 20:11 UTC ( [id://467042]=note: print w/replies, xml ) Need Help??


in reply to Re^3: Structure of a custom class (using Apache::Session)
in thread Structure of a custom class (using Apache::Session)

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

  • Comment on Re^4: Structure of a custom class (using Apache::Session)

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://467042]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2024-04-26 08:37 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found