Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic

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??

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?

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

How do I use this? | Other CB clients
Other Users?
Others about the Monastery: (7)
As of 2023-06-08 10:46 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (29 votes). Check out past polls.