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

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

Thread Previous | Thread Next
David Wheeler
January 13, 2003 15:38
Re: Parser Interface (Was Re: Picking up the ball)
Message ID:
On Monday, January 13, 2003, at 11:51  AM, Dave Rolsky wrote:

> Actually, I have some ideas for this.  Something like:
>   use DateTime;
>   use DateTime::Parse::MySQL;
>   my $dt = DateTime->from_mysql_datetime( $mysql_dt );
> So the parsing modules would just add methods to the DateTime 
> namespace.

Ah, the decorator pattern made easy. This once again shows why many 
design patterns are almost meaningless in Perl. ;-)


David Wheeler                                     AIM: dwTheory                                 ICQ: 15726394                      Yahoo!: dew7e

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About