Subject: | Pretty Print is causing round brackets to be removed. |
Date: | Wed, 9 Feb 2011 00:44:54 +0800 |
To: | bug-DBIx-Class [...] rt.cpan.org |
From: | Jeremy Carman <jeremy [...] directfreight.com> |
Issue: Turning DBIC_TRACE_PROFILE option on causes the pretty print to
remove some ( ) from trace output.
Example:
SELECT COUNT( * )
FROM all_loads_hist_daily me
WHERE city1 = 'test' AND city2 = 'test' AND comment = '' AND
companyname = 'CARMAN BIG RIG' AND contactinfo = '555-555-5555' AND
creditscore = '-1' AND entered_at = NOW( ) AND greenlight = '' AND
height = '' AND latitude1 = '1.00' AND latitude2 = '1.00' AND length =
'' AND longitude1 = '1.00' AND longitude2 = '1.00' AND md5sum = md5(
CONCAT username, city1, state1, city2, state2, type, other, size,
shipdate, receivedate, length, width, height, weight, payrate,
paytype, comment ) AND other = '' AND payrate = '' AND paytype = 'Per
Mile' AND receivedate = '0000-00-00' AND shipdate = '2011-02-08' AND
size = '' AND state1 = 'MO' AND state2 = 'MO' AND transid = '' AND
tripmiles = '-4' AND type = 'SD,AC,LB,' AND username = 'JJC111' AND
whoentered = 'A' AND width = ''
Show quoted text
-------- the search part of the code -------
$inserted = myapp->model("Legacy::$db")->search({
username => uc $user_data->username,
city1 => $params->{city1},
state1 => $params->{state1},
city2 => $params->{city2},
state2 => $params->{state2},
type => $type,
other => $params->{other} // '',
size => $params->{load_size} // '',
shipdate => $params->{date_avail},
receivedate =>
$params->{date_recieved} // '0000-00-00',
length => $params->{length} // '',
width => $params->{width} // '',
height => $params->{height} // '',
payrate => $params->{pay_rate},
paytype => $params->{pay_type},
comment => $params->{comments} // '',
entered_at => \' = NOW()',
whoentered => 'A',
latitude1 => $latlon1[0],
longitude1 => $latlon1[1],
latitude2 => $latlon2[0],
longitude2 => $latlon2[1],
md5sum => \'= md5( CONCAT( username,
city1, state1, city2, state2, type, other, size, shipdate,
receivedate, length, width, height, weight, payrate, paytype, comment)
)',
companyname => $user_data->company,
contactinfo => $user_data->contactinfo,
creditscore => $user_data->creditrating,
transid => $user_data->mcnumber,
tripmiles => $mileage,
greenlight => $user_data->greenlight,
}, { key => 'md5sum', } );
Turning off DBIC_TRACE_PROFILE revealed that the extra set of ( ) was still
there.
I am using The current version of catalyst(0.08127).
Linux, Kubuntu.
Bash
DBIC_TRACE_PROFILE=console DBIC_TRACE=1 perl myapp.pl
Thanks!