|Welcome to the Monastery|
OO Design question.by Anonymous Monk
|on Sep 27, 2011 at 13:52 UTC||Need Help??|
Anonymous Monk has asked for the
wisdom of the Perl Monks concerning the following question:
This is a simplified version of a class I have.
It does the job. It returns the correct object type for the parsed email and leads a profitable life.
I feel I've missed a trick. My OO design skills are
Seriously, I wonder if my parsing classes should be sub classes of a parent as they all have the same attributes (nearly) and only have the one method? So it would seem so but I'm not sure what benefit that would give me?
Also am I complicating things by returning objects of a different class? I think that my severity attribute is
only there so I don't have to call ref $obj in the calling