Thanks for the note. Perltidy has to guess if $x is a filehandle or not,
and guesses wrong in this case. It looks ahead and sees the whitespace and
makes an incorrect guess.
Steve
On Fri, May 13, 2016 at 5:37 AM, Trizen Daniel via RT <
bug-Perl-Tidy@rt.cpan.org> wrote:
Show quoted text> Fri May 13 08:37:09 2016: Request 114359 was acted upon.
> Transaction: Ticket created by TRIZEN
> Queue: Perl-Tidy
> Subject: Missparsing of "print $x ** 0.5;"
> Broken in: 20160302
> Severity: Normal
> Owner: Nobody
> Requestors: TRIZEN@cpan.org
> Status: new
> Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=114359 >
>
>
> Considering this code:
>
> #==BEGIN-CODE==#
>
> my $x = 2;
> print $x ** 0.5;
>
> #==END-CODE==#
>
> perltidy fails with the following error (in file.pl.ERR):
>
> #==BEGIN-ERROR==#
>
> Perltidy version is 20160302
>
> 4: print $x ** 0.5;
> -- ^
> found Number where operator expected (previous token underlined)
>
> #==END-ERROR==#
>