develooper Front page | perl.datetime | Postings from January 2003

Re: Parser Interface (Was Re: Picking up the ball)

Thread Previous | Thread Next
From:
David Wheeler
Date:
January 16, 2003 11:05
Subject:
Re: Parser Interface (Was Re: Picking up the ball)
Message ID:
59299B2E-2985-11D7-A08F-000393D9436A@wheeler.net
On Monday, January 13, 2003, at 07:14  PM, Dave Rolsky wrote:

> Your first option is not on the table.  The options on the table are:
>
>   use DateTime;
>   use DateTime::Parse::MySQL;
>   my $dt = DateTime->from_mysql_datetime( $mysql_dt );
>   print $dt->to_mysql_string();
>
> or
>
>   use DateTime;
>   use DateTime::Parse::MySQL;
>   my $dt = DateTime::Parse::MySQL->new_datetime( $mysql_dt );
>   print DateTime::Parse::MySQL->mysql_datetime( $dt );
>
> Frankly, I think the first one is a lot easier to use and makes more
> sense.  It's the decorator pattern without the dispatching overhead!

Trying to catch up here a bit. It seems to me that the first option 
could just be a pass-through to the second.

Regards,

David

-- 
David Wheeler                                     AIM: dwTheory
david@wheeler.net                                 ICQ: 15726394
http://david.wheeler.net/                      Yahoo!: dew7e
                                                Jabber: Theory@jabber.org


Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About