Sylvain Beucler <[EMAIL PROTECTED]> tapota : > Function DeleteGroup() in Groups.pm returns the result of $dbd->do(). > > This value is the number of rows returns, or -1 if that number is not > available, or undef on error. > > The number of row is a real number, eg 0E0, which means that any > number of row, including 0, is considered 'true' by Perl. > > This makes the DeleteGroup test in sv_register_discard to fail, so if > the group I want to delete does not exist, I am not warned. > > This can easily be fixed in sv_register_discard (test if < > 1). However, what is the precise signature of DeleteGroup? I think it > should return 0 (not 0E0) on error. However, maybe it should return > 0E0 for consistency with DeleteGroup*s*.
I think the difference between DeleteGroup and DeleteGroups is the fact that the first take as argument and unix group name and the second a WHERE sql statement. But both of these subs should probably return false/0 in case of failure. -- Mathieu Roy +---------------------------------------------------------------------+ | General Homepage: http://yeupou.coleumes.org/ | | Computing Homepage: http://alberich.coleumes.org/ | | Not a native english speaker: | | http://stock.coleumes.org/doc.php?i=/misc-files/flawed-english | +---------------------------------------------------------------------+
