On 2005-01-20 [EMAIL PROTECTED] wrote: >DT::Set count() currently returns "undef" on error, and "0" for empty >sets.
>Should it return "zero-but-true" (0e0) for empty sets? I use 0e0 (or '0 but true') in lots of cases where an empty set is a valid return value, where zero is a valid index, and where zero is a valid input datum not the same as that datum being "empty", all cases where truth tests alone aren't sufficient to distinguish a real zero from '', undef, etc. But I've wondered: is zbt one of those charming Perlisms that, for all its utility, might fall by the wayside or be shown to harbor potential for serious errors? >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; I say this is an improvement, pending enlightenment on the above question. As always, Flavio, thanks for your good work. - Bruce __bruce__van_allen__santa_cruz__ca__