Perl: the Markov chain saw | |
PerlMonks |
Re: Re: Object Oriented Pattern helpby DrZaius (Monk) |
on May 13, 2001 at 02:28 UTC ( [id://79973]=note: print w/replies, xml ) | Need Help?? |
You probably don't want your objects creating the dbh handles for you. This doesn't scale and is not portable; you have to edit your perl modules if you change your database or use on a different server.
What if you already have the database connection open in your code? Do you want your objects to open a new connection per object? But creating a $self->{dbh} is probably a good idea. I would do something like:
In Section
Seekers of Perl Wisdom
|
|