Amblikai has asked for the wisdom of the Perl Monks concerning the following question:
Hi Monks!
I'm writing a script at the moment which takes a couple of data structures and builds some objects from them. The data structures are setup information for a database and data to be input into that database respectively
My question is do i make a decision on the data before choosing to bless each set of data as a particular class?
Or am i better off blessing the objects as a parent class regardless, and then deciding which "subclass" the objects belong to and reclassifying them?
Even if i choose the first route, i think i'm going to have to change the class of the data objects eventually. so what's the best way to go about it? I know i could just "bless" the object again with a different class but it feels a bit funky!
Any help appreciated as always!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Reclassifying an object
by choroba (Cardinal) on Sep 29, 2015 at 11:05 UTC | |
by Amblikai (Scribe) on Sep 29, 2015 at 11:25 UTC | |
by choroba (Cardinal) on Sep 29, 2015 at 12:01 UTC | |
by salva (Canon) on Sep 29, 2015 at 11:49 UTC | |
|
Re: Reclassifying an object
by Athanasius (Archbishop) on Sep 29, 2015 at 16:42 UTC | |
|
Re: Reclassifying an object
by locked_user sundialsvc4 (Abbot) on Sep 29, 2015 at 17:15 UTC |