XP is just a number | |
PerlMonks |
Re: Best Coding practiceby SheridanCat (Pilgrim) |
on Dec 04, 2006 at 16:59 UTC ( [id://587695]=note: print w/replies, xml ) | Need Help?? |
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.
In Section
Seekers of Perl Wisdom
|
|