> Why not create a new method call, as you (IMHO) should have done in 1.38The change of behaviour in the tables () method is a straightforward nightmare
for me. Adding those quotations broke about all my applications.
Some of mine too. But quotes are technically required whenever a schema name and table name are combined. Without them you can't reliably separate the names as they may (in theory) contain '.'.
What I probably should have done is "redefine tables() to default to tables accessible from current schema without further qualification" _and_ made tables not use quote_identifier in that case if the name matched /^\w+$/.
But let's not get into that now. They'll be plenty of time down the road and I'll be open to suggestions as we go.
An alternate solution, which is also one of the guiding philosophies of the Rosetta API design, is to keep every distinct chunk of meta-data or schema info, etc in separate Perl variables, fully non-encoded, non-escaped, non-quoted, and pass around a "struct" if you will, rather than an encoded string. That makes it easiest for code to understand what it is looking at without messing around.
In this case, I suggest that each returned "table name" can consist of an array ref or a hash ref, where the first element is the unqualified table name, unquoted and unescaped, the second element is the schema name, likewise bare, and if applicable the third element is the catalog name. Perhaps a hash might work better, since it can be expanded the other way to refer to elements inside packages or modules or whatever, should you want to support that.
The fact is, all this quoting and escaping is simply to make the identifiers embeddable in a SQL string; they are not part of the actual identifier name. I believe that any DBI methods which purport to return actual schema names should do so, and perhaps for those who want it the quoted version can be returned by a function called "quoted_tables()" or something like that.
As an analogy, I see returning table names in a quoted form by default is like having the popular CGI module's param() return received query parameter values by default without un-url-escaping them.
-- Darren Duncan