in reply to has-a in Perl
All of my other data objects, inherit from this object. A few, override the object's methods such as param, if I need a specific behaviour. (such as throwing an exception if I get bad data passed in)# initialize/bless/ect $obj->new(); # serialize the objects data (currently with Storable) $obj->serialize(); # get/set params as in CGI.pm $obj->param(); # deserialize the objects data (Storable) $obj->deserialize(); # xml format $obj->to_xml(); # de-xml $obj->from_xml();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: has-a in Perl
by chromatic (Archbishop) on Apr 18, 2005 at 20:46 UTC | |
by cowboy (Friar) on Apr 18, 2005 at 23:03 UTC |