Why do DateTime formatters construct objects that don't have the
"formatter" field set by default? It seems to me that this is usually
better than leaving it blank.
e.g.
perl -MDateTime -MDateTime::Format::MySQL -MData::Dumper -wle'print
Dumper(DateTime::Format::MySQL->parse_datetime("2000-01-01 12:00:00"))'
gives:
$VAR1 = bless( {
...
'formatter' => undef,
}, 'DateTime' );
when wouldn't it be nicer if we got:
$VAR1 = bless( {
...
'formatter' => 'DateTime::Format::MySQL',
}, 'DateTime' );
instead?
Or does anyone see a big glaring reason why this *shouldn't* be done?
--
"There is always uncertainty to be found in a world of
imperfect information." - Jerome Nriagu, University of Michigan
. . . . .
Karen Etheridge, [email protected] GCS C+++$ USL+++$ P+++$ w--- M++
http://etheridge.ca/ PS++ PE-- b++ DI++++ e++ h(-)