While Dave's thinking about date math, can I go back a while ...

.. we were talking about method bload in DT. Since then we seem to have added a new routing for bringing in a default DateTime::Format module too.

.. to combat this, I looked at Dave's Class::ClassDecorator and released a proof-of-concept DateTime::Decorated module on this mailing list.

I didn't get a single response.

I want to again push for this, or a solution like it.

DateTime should just be an autonomous object that can deal with DateTimes and their manipulation *as data*. Anything else should be handled elsewhere.

I'd like to hear comment on stripping out lots of the methods currently in DateTime and have them moved to decorator modules -- as this will allow users to load what they want and only what they want in the way of functionality.

This is a large change in the API, but isn't that why Dave's leaving the $VERSION < 1.0?

Search the archives back to June 29th to see a working module. Here's the API:

use DateTime::Decorated
   with => [
      'strftime',       
         # Yes, pull it out of DT and put it in
         # DT:Format:Strftime and DT:Decorated:Strftime
       'strptime',
         # DT:Decorated:Strptime is an accessor interface to DT:F:Strp
      'common',
         # This will have all the 'ymd', 'mdy', 'dmy', 'hms' accessors
   ],
   as => 'DTD';

my $dtd = DTD->now;
print $dtd->hms();
# 10:10:23


Cheers!
Rick Measham



Reply via email to