Re: Patch for undefined value error when zero bind values

2004-01-26 Thread Tim Bunce
On Mon, Jan 26, 2004 at 03:26:32PM -, Avis, Ed wrote: > [diff to DBI.pm] > > >+ ($tuple_status) ? @$tuple_status = () : $tuple_status = []; > > AFAIK this code is equivalent to > > @$tuple_status = (); > > because of autovivification. True. I prefer to make it explicit. I guess a

RE: Patch for undefined value error when zero bind values

2004-01-26 Thread Avis, Ed
[diff to DBI.pm] >+ ($tuple_status) ? @$tuple_status = () : $tuple_status = []; AFAIK this code is equivalent to @$tuple_status = (); because of autovivification. But anyway, it works. -- Ed Avis <[EMAIL PROTECTED]>

Re: Patch for undefined value error when zero bind values

2004-01-26 Thread Tim Bunce
On Mon, Jan 26, 2004 at 02:21:33PM -, Avis, Ed wrote: > Tim Bunce <[EMAIL PROTECTED]> wrote: > > >Actualy I did this instead, as it seems more correct: > > > >@@ -1720,5 +1721,6 @@ > > sub execute_for_fetch { > >my ($sth, $fetch_tuple_sub, $tuple_status) = @_; > >- @$tuple_st

RE: Patch for undefined value error when zero bind values

2004-01-26 Thread Avis, Ed
Tim Bunce <[EMAIL PROTECTED]> wrote: >Actualy I did this instead, as it seems more correct: > >@@ -1720,5 +1721,6 @@ > sub execute_for_fetch { >my ($sth, $fetch_tuple_sub, $tuple_status) = @_; >- @$tuple_status = () if $tuple_status; # reset the status array >+ # start with

Re: Patch for undefined value error when zero bind values

2004-01-26 Thread Tim Bunce
On Mon, Jan 26, 2004 at 01:18:19PM +, Tim Bunce wrote: > Thanks, applied. > > Tim. > > On Mon, Jan 26, 2004 at 10:18:03AM -, Avis, Ed wrote: > > This patch to DBI-1.40 fixes an error > > > > Can't use an undefined value as an ARRAY reference at DBI.pm line 1735 > > > > when using execut

Re: Patch for undefined value error when zero bind values

2004-01-26 Thread Tim Bunce
Thanks, applied. Tim. On Mon, Jan 26, 2004 at 10:18:03AM -, Avis, Ed wrote: > This patch to DBI-1.40 fixes an error > > Can't use an undefined value as an ARRAY reference at DBI.pm line 1735 > > when using execute_array() with zero values for a bind parameter. It > includes some new test c

Patch for undefined value error when zero bind values

2004-01-26 Thread Avis, Ed
This patch to DBI-1.40 fixes an error Can't use an undefined value as an ARRAY reference at DBI.pm line 1735 when using execute_array() with zero values for a bind parameter. It includes some new test cases, but not all of the new tests failed before. diff -ru DBI-1.40/DBI.pm DBI-1.40-new/DBI.p