rampant selectrow_array misuse

David Miller justdave at bugzilla.org
Fri Aug 26 17:20:31 UTC 2005


Benton, Kevin wrote:

> In any case, I believe Dave has another valid point - even if it is
> technically correct to use the scalar context, style-wise, it seems to
> me it would be more clear (better self-documenting) if we use array
> context instead by wrapping the variable with ()'s.  This seems
> especially true to me if you "select foo, bar from baz";  In either
> case, to prevent inconsistent results, I think we should use one or the
> other, not both.

Yes, this was exactly my point.  The way it's being done now works, but 
it's a bad habit.  If we always use parens no matter when, then people 
who are trying to hack up Bugzilla and learning Perl will see that and 
follow suit, and will be less likely to make the mistakes with checking 
the results for nulls.

-- 
Dave Miller                                   http://www.justdave.net/
System Administrator, Mozilla Foundation       http://www.mozilla.org/
Project Leader, Bugzilla Bug Tracking System  http://www.bugzilla.org/



More information about the developers mailing list