DT::Set count() currently returns "undef" on error,
and "0" for empty sets.

Should it return "zero-but-true" (0e0) for empty sets?

Such that you could write:
  $count = $set->count or die "can't count";
instead of:
  $count = $set->count;
  die "can't count" unless defined $count;

- Flavio S. Glock


-- DT::Set POD ---
=item * count

Returns a count of C<DateTime> objects in the set.
..
when C<count()> operates on large recurrence sets, it
will return at most approximately C<200>. For larger
sets, and for I<infinite> sets, C<count()> will
return C<undef>.

Please note that this is explicitly not a scalar
zero, since a zero count is a valid return value for
empty sets!
..
-----------------


Reply via email to