On Saturday, January 11, 2003, at 11:08 AM, dLux wrote:
Yes, a similar approach occurred to me. We'll have to look at this when the time comes, for sure.I imagined the following stringification method:use overload '""' => "as_string"; sub as_string { my ($self) = @_; my ($package) = caller; no strict refs; return $package->FORMAT_DATETIME($self) if $package->can("FORMAT_DATETIME"); ... } The author of a module just have to write a date-stringification method of his package (obviously using strftime).
One issue to keep in mind: I don't think that DBI will stringify by default.
David
--
David Wheeler AIM: dwTheory
[EMAIL PROTECTED] ICQ: 15726394
http://david.wheeler.net/ Yahoo!: dew7e
Jabber: [EMAIL PROTECTED]