[ic] Redundant code in DBI.pm?

Mike Heins mikeh at perusion.com
Fri Mar 13 15:23:09 UTC 2015

Quoting Peter (peter at pajamian.dhs.org):
> 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.


If anyone wonders why I bothered with any of this, at one point I
was working on a database configuration system for Minivend 4. Spaces
in field names were not on my radar (even if they were supported in
SQL, which I don't think they were at that time), so it seemed like an
easy way to specify a field name and definition as in SQL. This never
was really used, as Akopia took over custody and we went in a different

Mike Heins
Perusion -- Expert Interchange Consulting    http://www.perusion.com/
phone +1.765.253.4194  <mike at perusion.com>

There's nothing sweeter than life nor more precious than time.
-- Barney

More information about the interchange-users mailing list