At 3:42 PM +1000 16/7/03, Iain Truskett wrote:
What do people think parsers should return if they can't
parse? And what if they do parse, but DateTime doesn't want
to create an object of the appropriate specification?

DateTime::Undef :)


If all modules return DateTime::Undef and all modules handle it when passed it, then everything flows.

If we return undef, then we need to make sure all methods can handle undef parameters cleanly. Of course, we really can't do this because:
undef->set( day=>$day )
is an error .. no matter what!


However:
        $undef = new DateTime::Undef;
        $undef->set( day=>$day );
just returns DateTime::Undef;

Cheers!
Rick

--
--------------------------------------------------------
            There are 10 kinds of people:
  those that understand binary, and those that don't.
--------------------------------------------------------
  The day Microsoft makes something that doesn't suck
    is the day they start selling vacuum cleaners
--------------------------------------------------------
"Write a wise proverb and your name will live forever."
   -- Anonymous
--------------------------------------------------------

Reply via email to