Oh great makers of Heroic Perl,
I am trying to build a system, and as I sit here in my dark corner all by myself contemplating the possiblities, I am struck that I need some guidence.
As part of the exercise in making this program/system, I am using Object Oriented Perl modules. This is an effort to deepen my understanding of the subject. I am also using a database to keep the data persistent.
Sorry for the vagueness, but the specifics have little to do with my question.
What would be the best way to create an object which in part would have member data based on the data from a table. I want to create this so that as columns are added or deleted from the table the code in the object need not be changed.
Let me give a generic example, if I may. My table has columns:
a b c d
I retrieve data from the table into a hash, and use this hash to create the new object. The new object has this data, plus addition data from other tables or specific settings. I want to leave this open-ended so it can all be driven by the db.
I know how to create objects and all that, but I have never done it in this way. Is it possible, and if so, can anyone make suggestions on the best approach?
I lay down at the alter of the monks awaiting their wisdom.
(Ya think, I grovelled enough?)
Edit ar0n -- removed excessive <code> tags
In reply to OO Perl and Design Issues by jonjacobmoon
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |