On Thu, Nov 11, 2004 at 08:39:42PM +0000, Brian McCauley wrote:
> $sth->execute_array({ ArrayTupleStatus => [] }, "FOO", [] );
>
> ...used to be a no-op and now is equvalent to...
>
> $sth->execute ( "FOO", undef);
>
> IMHO there is no good reason for this. If I pass an empty array I
> expect nothing to happen. I have a largish codebase based on this quite
> resonable expectation.
It can be argued that both expectations are reasonable.
But I can see that ignoring pure-scalar parameters when calculating
tuples to execute is more "practical".
I'll change it.
Tim.
> foreach (keys(%hash_of_arrays)) {
> my $ary = $hash_of_arrays{$_};
> my $len = (ref $ary eq 'ARRAY') ? @$ary : 1;
> $maxlen = $len if $len > $maxlen;
> }
>
> Should be...
>
> foreach (values(%hash_of_arrays)) {
> $maxlen = @$_ if ref eq 'ARRAY' && @$_ > $maxlen;
> }