On Sun, 28 Mar 2004, Eugene van der Pijll wrote:

> Is it possible to detect mixed durations other than checking all of
> is_positive, is_zero and is_negative? For example by adding an is_mixed
> method?

Something like that, with a better name than is_mixed would be good.
Name suggestions, anyone

> You could also change the behaviour of is_positive etc., returning 0 for
> negative or zero, and undef for 'unknown' (mixed durations).

Three state logic is a _huge_ PITA for the end user.  See SQL and NULLs if
you want a good example of how bad an idea this is ;)

Nobody wants to write:

  my $is_pos = $dur->is_positive;
  if ($is_po��s{ ... }
  elsif (defined $is_pos) { ... }
  else { ... }



-dave

/*=======================
House Absolute Consulting
www.houseabsolute.com
=======================*/

Reply via email to