Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Best Coding practice

by SheridanCat (Pilgrim)
on Dec 04, 2006 at 16:59 UTC ( [id://587695]=note: print w/replies, xml ) Need Help??


in reply to Best Coding practice

This is confusing me a bit. Are you asking whether it is better to set an attribute on an instance object that contains the database handle vs. passing it in through method calls on that instance object?

I'm not sure what the best practice is on this. I've done it both ways. I tend to set it in the instance because I then I don't have to remember to pass it in, I can just call $self->{'dbh'} and get the handle I expect.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (1)
As of 2024-04-25 00:25 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found