Subject: | fetchall_arrayref({}) in certain cases |
Some DBD drivers, like DBD::Sybase, could return undef for $sth->FETCH("NAME") in certain cases. When calling fetchall_arrayref({}), it could cause an error like "Can't use an undefined value as an ARRAY reference at .../DBI.pm line 2081", which is this line
https://metacpan.org/source/TIMB/DBI-1.640/DBI.pm#L2081
IMHO it could be better to change this line to below
my @column_names = @{ $sth->FETCH($sth->FETCH('FetchHashKeyName'))
|| [] };
We also have old DBI version 1.616 and that one does not have the issue. I think this issue appears after DBI 1.619. There was a similar report several years ago https://www.nntp.perl.org/group/perl.dbi.users/2013/09/msg36748.html