Skip Menu |

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

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

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

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



Subject: for-loop in a parenthesized block-map
There seems to be an error if we use a 'for' loop inside a block-map which has parentheses around it. Example: map( { foreach my $item ('0', '1'){print $item} } qw(a b c) ); The error is: 3: foreach my $item ('0', '1'){print $item} ----- ^ found ( where operator expected (previous token underlined) Do you mean '$item->(' ? 3: syntax error at ') {', didn't see one of: case elsif for foreach given if switch unless until when while
Subject: Re: [rt.cpan.org #94338] for-loop in a parenthesized block-map
Date: Mon, 31 Mar 2014 07:01:54 -0700
To: bug-Perl-Tidy [...] rt.cpan.org
From: Steven Hancock <perltidy [...] users.sourceforge.net>
Thanks for the report, I will fix it as soon as possible. Steve On Mon, Mar 31, 2014 at 6:47 AM, Trizen Daniel via RT < bug-Perl-Tidy@rt.cpan.org> wrote: Show quoted text
> Mon Mar 31 09:47:30 2014: Request 94338 was acted upon. > Transaction: Ticket created by TRIZEN > Queue: Perl-Tidy > Subject: for-loop in a parenthesized block-map > Broken in: 20140328 > Severity: Normal > Owner: Nobody > Requestors: TRIZEN@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=94338 > > > > There seems to be an error if we use a 'for' loop inside a block-map which > has parentheses around it. > > Example: > map( > { > foreach my $item ('0', '1'){print $item} > } qw(a b c) > ); > > > The error is: > 3: foreach my $item ('0', '1'){print $item} > ----- ^ > found ( where operator expected (previous token underlined) > > Do you mean '$item->(' ? > 3: syntax error at ') {', didn't see one of: case elsif for foreach > given if switch unless until when while > >
This is fixed in version 20140711, thanks for the report.