Hi Iain, Looks good. Kind of overwhelming, but once the synopsis is expanded that won't be an issue as much. I'm running out the door and haven't had a chance to play with it, but looking over it 2 thoughts occured to me:
1. You've removed the 'zeroes' functionality. It was useful, what was descision there? 2. I think we should have a DateTime::Format base class, and soon as the ease of writing Format class is going to lead to a proliferation. It could simply be abstract for now, and we could make it into a factory later. (but it might for example, make more sense to throw the "format_datetime not implemented" exception from there) 3. Builder.pm is very focused on parsing datetimes, we should comment somewhere that formats can also provide other types of parsing and formating, e.g. parse_duration, parse_recurrence, parse_interval, etc (corresponding format_) Good work. kellan On Fri, 21 Mar 2003, Iain 'Spoon' Truskett wrote: > Morning all, > > > Wander over to > > http://perl.dellah.org/modules/ > > and have a look at DateTime::Format::Builder. It's not finished. > > The docs need work, it needs more tests, and it's missing some features. > (And the tests to test the missing features.) > > I'm about to sleep and won't get a chance to play with it for quite a > few hours, so patches, advice, etc. are welcome. > > I admit I think I got a bit carried away. =) > > > One thing I just realised I didn't explain in the docs is the purpose of > permitting specrefs to be code. That's so you can chain things if you so > desire. Want it to first check via lengths, and then via 'normal' specs? > Just a simple matter of composing a parser fn that calls two other > parser fns. A nice touch, when implemented, that adds quite a bit of > power. > > I do need to clean up the exceptions I throw. I throw too many. Or, feel > free to send a patch (to me, or to the list; the rt.cpan.org address > won't work until I upload to CPAN). > > > cheers, > -- > Iain. >
