Subject: | Refuse to format code (no perl sintax error) |
Date: | Mon, 27 Aug 2018 11:52:04 -0300 |
To: | bug-perl-tidy [...] rt.cpan.org |
From: | Renato Santos <renato.cron [...] gmail.com> |
Hello,
Today, I found a strange error when trying to format a code that contains:
sub _base_select_query {
my $restrict_customer = shift ? 1 : 0;
$restrict_customer = $restrict_customer ? ' me.customer_id = ? AND ' :
'';
# ...
}
Returned error is:
#######
Perltidy version is 20180220
5: $restrict_customer = $restrict_customer ? ' me.customer_id = ...
^
found String where operator expected
#######
Same message on version 20160302
--
It tidy successfully if I change add () to shift or if I remove the ternary
after shift (that's I'm doing, to be honest, after reading it, I assume
that look a bit odd to do what I did)
Thank you,
--
YAGNI,
Renato CRON
http://www.renatocron.com/blog/
@renato_cron <http://twitter.com/#!/renato_cron>