Skip Menu |

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

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

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

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



Subject: PerlTidy does not understand the new postfix dereferencing
Using the new dereferencing syntax introduced in 5.20 produces errors in PerlTidy. The attached badtidy.pl script is syntactically valid and runs (if dev_data.json is a valid jason file). In addition to the errors reported for the foreach loop, if it is commented perltidy will change the line my $e = $jdata->[1]->%*; to my $e = $jdata->[1]->% *; seperating the % from the * will cause the script to not run.
Subject: PerlTidy.output.txt
PerlTidy: Errors reported by perltidy during last run ===================================================== 9: foreach my $j ( $jdata->@* ) { process_element( $j->%* ); } --^ found Array where operator expected (previous token underlined) 9: foreach my $j ( $jdata->@* ) { process_element( $j->%* ); } ^ 9: foreach my $j ( $jdata->@* ) { process_element( $j->%* ); } ^ 9: foreach my $j ( $jdata->@* ) { process_element( $j->%* ); } ^ Found 1 extra '(' between '{' on line 9 and '}' on line 9 The most recent un-matched '(' is on line 9 11: final indentation level: 1 Final nesting depth of '('s is 1 The most recent un-matched '(' is on line 9 9: foreach my $j ( $jdata->@* ) { process_element( $j->%* ); } ^ 11: To save a full .LOG file rerun with -g
Subject: badtidy.pl
use 5.020; use experimental qw / autoderef postderef signatures/; use File::Slurp::Tiny 'read_file'; my $jsonfile = read_file('dev_data.json'); my $jdata = decode_json $jsonfile ; sub processit ( %hashthing ) { 1; } foreach my $j ( $jdata->@* ) { processit( $j->%* ); } my $e = $jdata->[1]->%* ;
Subject: Re: [rt.cpan.org #98348] PerlTidy does not understand the new postfix dereferencing
Date: Wed, 27 Aug 2014 08:33:07 -0700
To: "bug-Perl-Tidy [...] rt.cpan.org" <bug-Perl-Tidy [...] rt.cpan.org>
From: Steven Hancock <perltidy [...] users.sourceforge.net>
John, Update to the latest version of perltidy, it looks like you are using an older version. Steve On Wed, Aug 27, 2014 at 12:05 AM, John Karr via RT < bug-Perl-Tidy@rt.cpan.org> wrote: Show quoted text
> Wed Aug 27 03:05:42 2014: Request 98348 was acted upon. > Transaction: Ticket created by BRAINBUZ > Queue: Perl-Tidy > Subject: PerlTidy does not understand the new postfix dereferencing > Broken in: 20140711 > Severity: Normal > Owner: Nobody > Requestors: BRAINBUZ@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=98348 > > > > Using the new dereferencing syntax introduced in 5.20 produces errors in > PerlTidy. > > The attached badtidy.pl script is syntactically valid and runs (if > dev_data.json is a valid jason file). > > In addition to the errors reported for the foreach loop, if it is > commented perltidy will change the line my $e = $jdata->[1]->%*; to my $e = > $jdata->[1]->% *; seperating the % from the * will cause the script to not > run. > > PerlTidy: Errors reported by perltidy during last run > ===================================================== > > 9: foreach my $j ( $jdata->@* ) { process_element( $j->%* ); } > --^ > found Array where operator expected (previous token underlined) > > 9: foreach my $j ( $jdata->@* ) { process_element( $j->%* ); } > ^ > 9: foreach my $j ( $jdata->@* ) { process_element( $j->%* ); } > ^ > 9: foreach my $j ( $jdata->@* ) { process_element( $j->%* ); } > ^ > Found 1 extra '(' between '{' on line 9 and '}' on line 9 > The most recent un-matched '(' is on line 9 > 11: final indentation level: 1 > > Final nesting depth of '('s is 1 > The most recent un-matched '(' is on line 9 > 9: foreach my $j ( $jdata->@* ) { process_element( $j->%* ); } > ^ > 11: To save a full .LOG file rerun with -g > >
Subject: Re: [rt.cpan.org #98348] PerlTidy does not understand the new postfix dereferencing
Date: Wed, 27 Aug 2014 12:14:38 -0400
To: bug-Perl-Tidy [...] rt.cpan.org
From: "John Karr" <brainbuz [...] brainbuz.org>
I tested my example file on a different computer here at work and there wasn't a problem, so I went ahead and closed the ticket. I'm guessing that although I had the current version installed in my user perl, the outdated copy in system perl was being executed. Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=98348 > > > John, > Update to the latest version of perltidy, it looks like you are using an > older version. > Steve > > > On Wed, Aug 27, 2014 at 12:05 AM, John Karr via RT < > bug-Perl-Tidy@rt.cpan.org> wrote: >
>> Wed Aug 27 03:05:42 2014: Request 98348 was acted upon. >> Transaction: Ticket created by BRAINBUZ >> Queue: Perl-Tidy >> Subject: PerlTidy does not understand the new postfix dereferencing >> Broken in: 20140711 >> Severity: Normal >> Owner: Nobody >> Requestors: BRAINBUZ@cpan.org >> Status: new >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=98348 > >> >> >> Using the new dereferencing syntax introduced in 5.20 produces errors in >> PerlTidy. >> >> The attached badtidy.pl script is syntactically valid and runs (if >> dev_data.json is a valid jason file). >> >> In addition to the errors reported for the foreach loop, if it is >> commented perltidy will change the line my $e = $jdata->[1]->%*; to my >> $e = >> $jdata->[1]->% *; seperating the % from the * will cause the script to >> not >> run. >> >> PerlTidy: Errors reported by perltidy during last run >> ===================================================== >> >> 9: foreach my $j ( $jdata->@* ) { process_element( $j->%* ); } >> --^ >> found Array where operator expected (previous token underlined) >> >> 9: foreach my $j ( $jdata->@* ) { process_element( $j->%* ); } >> ^ >> 9: foreach my $j ( $jdata->@* ) { process_element( $j->%* ); } >> ^ >> 9: foreach my $j ( $jdata->@* ) { process_element( $j->%* ); } >> ^ >> Found 1 extra '(' between '{' on line 9 and '}' on line 9 >> The most recent un-matched '(' is on line 9 >> 11: final indentation level: 1 >> >> Final nesting depth of '('s is 1 >> The most recent un-matched '(' is on line 9 >> 9: foreach my $j ( $jdata->@* ) { process_element( $j->%* ); } >> ^ >> 11: To save a full .LOG file rerun with -g >> >>
> >