From: Arthur Axel 'fREW' Schmidt Date: Fri, 27 Jul 2012 14:28:11 +0000 (-0500) Subject: quoted scalarrefs work when they make sense X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=eaa7ad85af8f68b70bc257da174fc6ac73e6dc13;p=dbsrgits%2FDBIx-Class-Historic.git quoted scalarrefs work when they make sense --- diff --git a/t/sqlmaker/quotes/quotes.t b/t/sqlmaker/quotes/quotes.t index 1566a7d..f18dc68 100644 --- a/t/sqlmaker/quotes/quotes.t +++ b/t/sqlmaker/quotes/quotes.t @@ -37,9 +37,9 @@ eval { $rs->first }; like($sql, qr/ORDER BY `\Q${order}\E`/, 'quoted ORDER BY with DESC (should use a scalarref anyway)'); $rs = $schema->resultset('CD')->search({}, - { 'order_by' => \$order }); + { 'order_by' => \'RANDOM() DESC' }); eval { $rs->first }; -like($sql, qr/ORDER BY \Q${order}\E/, 'did not quote ORDER BY with scalarref'); +like($sql, qr/ORDER BY \QRANDOM() DESC\E/, 'did not quote ORDER BY with scalarref'); $schema->storage->sql_maker->quote_char([qw/[ ]/]); $schema->storage->sql_maker->name_sep('.'); diff --git a/t/sqlmaker/quotes/quotes_newstyle.t b/t/sqlmaker/quotes/quotes_newstyle.t index c122517..9ac2534 100644 --- a/t/sqlmaker/quotes/quotes_newstyle.t +++ b/t/sqlmaker/quotes/quotes_newstyle.t @@ -43,9 +43,9 @@ eval { $rs->first }; like($sql, qr/ORDER BY `\Q${order}\E`/, 'quoted ORDER BY with DESC (should use a scalarref anyway)'); $rs = $schema->resultset('CD')->search({}, - { 'order_by' => \$order }); + { 'order_by' => \'RANDOM() DESC' }); eval { $rs->first }; -like($sql, qr/ORDER BY \Q${order}\E/, 'did not quote ORDER BY with scalarref'); +like($sql, qr/ORDER BY \QRANDOM() DESC\E/, 'did not quote ORDER BY with scalarref'); $schema->connection( $dsn,