Skip Menu |

This queue is for tickets about the Perl-Tidy CPAN distribution.

Report information
The Basics
Id: 126965
Status: resolved
Priority: 0/
Queue: Perl-Tidy

People
Owner: Nobody in particular
Requestors: renato.cron [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



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>
Subject: Re: [rt.cpan.org #126965] Refuse to format code (no perl sintax error)
Date: Mon, 27 Aug 2018 12:51:30 -0700
To: bug-Perl-Tidy [...] rt.cpan.org
From: Steven Hancock <s7078hancock [...] gmail.com>
Thanks!! It's a parsing error. I'll fix it in the next release. Steve On Mon, Aug 27, 2018 at 7:52 AM Renato Santos via RT < bug-Perl-Tidy@rt.cpan.org> wrote: Show quoted text
> Mon Aug 27 10:52:29 2018: Request 126965 was acted upon. > Transaction: Ticket created by renato.cron@gmail.com > Queue: Perl-Tidy > Subject: Refuse to format code (no perl sintax error) > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: renato.cron@gmail.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=126965 > > > > 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> > >
Subject: Re: [rt.cpan.org #126965] Refuse to format code (no perl sintax error)
Date: Mon, 27 Aug 2018 16:55:17 -0300
To: bug-Perl-Tidy [...] rt.cpan.org
From: Renato Santos <renato.cron [...] gmail.com>
Awesome, thanks! Please don't expend too many hours on this, I just reported to it became know, not necessarily to be solved! On Mon, Aug 27, 2018, 16:52 Steven Hancock via RT <bug-Perl-Tidy@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=126965 > > > Thanks!! > It's a parsing error. I'll fix it in the next release. > Steve > > On Mon, Aug 27, 2018 at 7:52 AM Renato Santos via RT < > bug-Perl-Tidy@rt.cpan.org> wrote: >
> > Mon Aug 27 10:52:29 2018: Request 126965 was acted upon. > > Transaction: Ticket created by renato.cron@gmail.com > > Queue: Perl-Tidy > > Subject: Refuse to format code (no perl sintax error) > > Broken in: (no value) > > Severity: (no value) > > Owner: Nobody > > Requestors: renato.cron@gmail.com > > Status: new > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=126965 > > > > > > > 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> > > > >
> >
This is fixed in perltidy version 20181117.