Clear questions and runnable code get the best and fastest answer |
|
PerlMonks |
Writing Better Objectsby Angel (Friar) |
on Jun 09, 2003 at 21:39 UTC ( [id://264472]=perlquestion: print w/replies, xml ) | Need Help?? |
Angel has asked for the wisdom of the Perl Monks concerning the following question: Dear Monks I have been writing many objects for a while and most of them fall into the general pattern of simply wrapping a mySQL table. They load a record from the table put the variables into the object hash and then get and set functions manipulate the data and provide input correctness and output formatting. I did this previously by every field having a get and set method which got the data from the database or wrote directly to the database. It worked but it is not very efficient. Basically my code consisted of many many verions of this:
Now I wonder since 90 percent of my objects simply wrap a table like the above code is there a better way? Edit by tye, add READMORE tag
Back to
Seekers of Perl Wisdom
|
|