On Fri, 21 Mar 2003, Iain 'Spoon' Truskett wrote:

> > The "correct_years" parameter should probably go away.  It's _way_ too
> > specific to one format (MySQL).
>
> Well, any format that has two digit years. Still, abolished.

Yeah, but others may treat 0-79 as 2000 and 80-00 as 1900, and so on.
That was what was too specific.

> > Instead I think there needs to be a "post-process" callback allowed,
> > something that gets the paramaters _and_ the original string being
> > parsed, and is expected to return the parameters, along with any
> > modifications. This could probably just be the "on_match" callback.
>
> Hmm. Yes. No. Yes. No. I'd like for on_match to be able to happen
> without having to return anything.

Ok, but it seems like some sort of post-processing feature might be good.

> Bare in mind that 0.22 was just what I wrote before any sort of
> refactoring. I generally need a decent sized break before refactoring,
> to clear my head of any assumptions (one of the useful things about
> having a bad memory). That said, I happily accept your criticism.

That's cool.  That's what code review's for, right? ;)

One more thing.  I think the create_class method should simply use the
package name of its caller, rather than take one explicitly, and should
probably be renamed "create_methods".  It's going to be used by format
module writers who'll do:

 package DateTime::Format::Gobbledygook;

 use DateTime::Format::Builder;

 DateTime::Format::Builder->create_methods( ... );


-dave

/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/

Reply via email to