On Tue, Jun 10, 2003 at 03:30:05PM -0500, Dave Rolsky wrote: > On Tue, 10 Jun 2003, Ben Bennett wrote: > > > However, I have no idea how fast this is and how much memory it > > consumes. I will try to release what I have tonight (when I hope to > > have it in a more usable state). > > I played with P::RecDescent for Mason, and it is slow and a memory hog. > That's no dis to Damian, cause it's a great tool, but in most cases a > custom regex-based parser is way faster.
I agree. And I'll repeat my (carefully worded) statement that "A single regex could handle all formats that follow the ISO 8601 general left-to-right decreasing resolution style, with assorted optional punctuation, plus optional appended TZ." I'm assuming here that a DateTime::Format::Common module should only support four digit years. If you need two digit years then use a specific date parser module. Similarly I'd prefer it to not handle named months (as per ISO 8601) but if it does, then only the English three character abbreviations. Again, if you need more, use a specific date parser module. The DateTime::Format::Common should be *small and fast*. So no Parse::RecDescent, and no fancy features. Those that want an all-singing-all-dancing-guess-your-weight date parser should work on a new, separate, module that can be loaded with all the smarts you want. Tim.
