[ic] Redundant code in DBI.pm?

Peter peter at pajamian.dhs.org
Fri Mar 13 14:59:59 UTC 2015

On 03/14/2015 03:51 AM, Peter wrote:
> Well I've managed to write my code so that those two lines aren't
> affected by it whether QUOTE_IDENTIFIERS is set or not, so I can leave
> it in.  I just noticed those lines when I was digging around in that
> section of code and I think the first can, at least, be removed without
> consequence.  But I can leave it in to be extra safe.

Oh, sorry, I take it back.  I can't leave that line in.  The reason is
as follows:

When QUOTE_IDENTIFIERS is enabled, $columns will contain the unquoted
column names as it did before, but @cols will contain the quoted column
names that will be passed to the SQL db.  so if the column name is
copied from @cols to $columns it will break later code that needs the
unquoted name (not destined for an SQL query).

As I said earlier, and I believe you have confirmed in your tests,
removing the first of those two lines does not break the feature you
implemented with them, and the second regexp line still supports it.


More information about the interchange-users mailing list