Skip Menu |
 

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

Report information
The Basics
Id: 114359
Status: open
Priority: 0/
Queue: Perl-Tidy

People
Owner: Nobody in particular
Requestors: TRIZEN [...] cpan.org
Cc:
AdminCc:

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



Subject: Missparsing of "print $x ** 0.5;"
Download (untitled) / with headers
text/plain 316b
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==#
Subject: Re: [rt.cpan.org #114359] Missparsing of "print $x ** 0.5;"
Date: Fri, 13 May 2016 06:26:59 -0700
To: "bug-Perl-Tidy [...] rt.cpan.org" <bug-Perl-Tidy [...] rt.cpan.org>
From: Steven Hancock <s7078hancock [...] gmail.com>
Download (untitled) / with headers
text/plain 991b
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==# >


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.