On Wed, 28 Mar 2007, Boorstein, Daniel B wrote:
Are you saying that in general you don't expect classes derived from DateTime to include additional instance data in the conventional manner (tacking it onto $self)?
I'm not even sure I expect classes to derive from DateTime at all. DateTime.pm is written to make this possible, but as has been discussed in this thread and others, there are problems with it.
You'll have to override a number of methods in order to handle that extra data, since internally DateTime.pm creates new objects in order to implement date math.
In the particular case of providing information about an event, I really think that subclassing is the wrong solution. In fact, in general, subclassing is the wrong solution for many, many things, especially in Perl, which makes subclassing harder than many languages.
-dave /*=================================================== VegGuide.Org www.BookIRead.com Your guide to all that's veg. My book blog ===================================================*/
