Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: chad.granum [...] dreamhost.com
Cc:
AdminCc:

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



Subject: perltidy incorrectly assumes 'case' is special
Date: Tue, 6 May 2014 15:10:40 -0700
To: bug-Perl-Tidy [...] rt.cpan.org
From: Chad Granum <chad.granum [...] dreamhost.com>
case is not a resevred keyword in perl. It is not special in any-way unless you use features/modules that enable it. Perltidy should treat it like it would any other function. This bug came up in a Fennec unit test where 'case' is an exported function. Sample: case "blah" => sub { {a => 1} }; Gets tidied to: case "blah" => sub { { a => 1; } }; Which is a syntax error with that extra semicolon. Tidyrc used: --indent-columns=4 # size of indentation --nt # no tabs --continuation-indentation=4 # indentation of wrapped lines --maximum-line-length=0 # max line length before wrapping (turn it off) --nooutdent-long-quotes # do not outdent overly long quotes --paren-tightness=2 # no spacing for parentheses --square-bracket-tightness=2 # no spacing for square brackets --brace-tightness=2 # no spacing for hash curly braces --block-brace-tightness=0 # spacing for coderef curly braces --comma-arrow-breakpoints=1 # break long key/value pair lists --break-at-old-comma-breakpoints # this attempts to retain list break points --no-blanks-before-comments # do not insert blank lines before comments --indent-spaced-block-comments # no blanks before comments --nocuddled-else # Do not cuddle else --nospace-for-semicolon # no space before semicolons in loops --nospace-terminal-semicolon # no space before termonal semicolons --notrim-qw # Do not mess with qw{} whitespace
Subject: Re: [rt.cpan.org #95419] perltidy incorrectly assumes 'case' is special
Date: Tue, 6 May 2014 21:30:02 -0700
To: "bug-Perl-Tidy [...] rt.cpan.org" <bug-Perl-Tidy [...] rt.cpan.org>
From: Steven Hancock <s7078hancock [...] gmail.com>
Chad, I will fix that in the next release. Thanks, Steve On Wednesday, May 7, 2014, Chad Granum via RT <bug-Perl-Tidy@rt.cpan.org> wrote: Show quoted text
> Tue May 06 18:10:52 2014: Request 95419 was acted upon. > Transaction: Ticket created by chad.granum@dreamhost.com <javascript:;> > Queue: Perl-Tidy > Subject: perltidy incorrectly assumes 'case' is special > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: chad.granum@dreamhost.com <javascript:;> > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=95419 > > > > case is not a resevred keyword in perl. It is not special in any-way unless > you use features/modules that enable it. Perltidy should treat it like it > would any other function. > > This bug came up in a Fennec unit test where 'case' is an exported > function. > > Sample: > > case "blah" => sub { {a => 1} }; > > Gets tidied to: > > case "blah" => sub { > { > a => 1; > } > }; > > Which is a syntax error with that extra semicolon. > > Tidyrc used: > --indent-columns=4 # size of indentation > --nt # no tabs > --continuation-indentation=4 # indentation of wrapped lines > --maximum-line-length=0 # max line length before wrapping > (turn it off) > --nooutdent-long-quotes # do not outdent overly long quotes > --paren-tightness=2 # no spacing for parentheses > --square-bracket-tightness=2 # no spacing for square brackets > --brace-tightness=2 # no spacing for hash curly braces > --block-brace-tightness=0 # spacing for coderef curly braces > --comma-arrow-breakpoints=1 # break long key/value pair lists > --break-at-old-comma-breakpoints # this attempts to retain list break > points > --no-blanks-before-comments # do not insert blank lines before > comments > --indent-spaced-block-comments # no blanks before comments > --nocuddled-else # Do not cuddle else > --nospace-for-semicolon # no space before semicolons in loops > --nospace-terminal-semicolon # no space before termonal semicolons > --notrim-qw # Do not mess with qw{} whitespace > >
Subject: Re: [rt.cpan.org #95419] perltidy incorrectly assumes 'case' is special
Date: Thu, 29 May 2014 15:43:39 -0700
To: "bug-Perl-Tidy [...] rt.cpan.org" <bug-Perl-Tidy [...] rt.cpan.org>
From: Steven Hancock <s7078hancock [...] gmail.com>
Chad, I started working on this and can't reproduce it. What version of perltidy are you running? Thanks, Steve On Tue, May 6, 2014 at 9:30 PM, Steven Hancock via RT < bug-Perl-Tidy@rt.cpan.org> wrote: Show quoted text
> Queue: Perl-Tidy > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=95419 > > > Chad, I will fix that in the next release. Thanks, Steve > > On Wednesday, May 7, 2014, Chad Granum via RT <bug-Perl-Tidy@rt.cpan.org> > wrote: >
> > Tue May 06 18:10:52 2014: Request 95419 was acted upon. > > Transaction: Ticket created by chad.granum@dreamhost.com <javascript:;> > > Queue: Perl-Tidy > > Subject: perltidy incorrectly assumes 'case' is special > > Broken in: (no value) > > Severity: (no value) > > Owner: Nobody > > Requestors: chad.granum@dreamhost.com <javascript:;> > > Status: new > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=95419 > > > > > > > case is not a resevred keyword in perl. It is not special in any-way
> unless
> > you use features/modules that enable it. Perltidy should treat it like it > > would any other function. > > > > This bug came up in a Fennec unit test where 'case' is an exported > > function. > > > > Sample: > > > > case "blah" => sub { {a => 1} }; > > > > Gets tidied to: > > > > case "blah" => sub { > > { > > a => 1; > > } > > }; > > > > Which is a syntax error with that extra semicolon. > > > > Tidyrc used: > > --indent-columns=4 # size of indentation > > --nt # no tabs > > --continuation-indentation=4 # indentation of wrapped lines > > --maximum-line-length=0 # max line length before wrapping > > (turn it off) > > --nooutdent-long-quotes # do not outdent overly long quotes > > --paren-tightness=2 # no spacing for parentheses > > --square-bracket-tightness=2 # no spacing for square brackets > > --brace-tightness=2 # no spacing for hash curly braces > > --block-brace-tightness=0 # spacing for coderef curly braces > > --comma-arrow-breakpoints=1 # break long key/value pair lists > > --break-at-old-comma-breakpoints # this attempts to retain list break > > points > > --no-blanks-before-comments # do not insert blank lines before > > comments > > --indent-spaced-block-comments # no blanks before comments > > --nocuddled-else # Do not cuddle else > > --nospace-for-semicolon # no space before semicolons in
> loops
> > --nospace-terminal-semicolon # no space before termonal
> semicolons
> > --notrim-qw # Do not mess with qw{} whitespace > > > >
> >
Subject: Re: [rt.cpan.org #95419] perltidy incorrectly assumes 'case' is special
Date: Fri, 30 May 2014 07:43:25 -0700
To: bug-Perl-Tidy [...] rt.cpan.org
From: Chad Granum <chad.granum [...] dreamhost.com>
cgranum@fubar $ perltidy -v [~] This is perltidy, v20071205 Copyright 2000-2007, Steve Hancock Perltidy is free software and may be copied under the terms of the GNU General Public License, which is included in the distribution files. Complete documentation for perltidy can be found using 'man perltidy' or on the internet at http://perltidy.sourceforge.net. Yikes, looks like our server is using quite an old version. I will see if we can convince the syadmins to upgrade. On Thu, May 29, 2014 at 3:43 PM, Steven Hancock via RT < bug-Perl-Tidy@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=95419 > > > Chad, > I started working on this and can't reproduce it. What version of perltidy > are you running? > Thanks, > Steve > > > On Tue, May 6, 2014 at 9:30 PM, Steven Hancock via RT < > bug-Perl-Tidy@rt.cpan.org> wrote: >
> > Queue: Perl-Tidy > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=95419 > > > > > Chad, I will fix that in the next release. Thanks, Steve > > > > On Wednesday, May 7, 2014, Chad Granum via RT <bug-Perl-Tidy@rt.cpan.org > > > > wrote: > >
> > > Tue May 06 18:10:52 2014: Request 95419 was acted upon. > > > Transaction: Ticket created by chad.granum@dreamhost.com
> <javascript:;>
> > > Queue: Perl-Tidy > > > Subject: perltidy incorrectly assumes 'case' is special > > > Broken in: (no value) > > > Severity: (no value) > > > Owner: Nobody > > > Requestors: chad.granum@dreamhost.com <javascript:;> > > > Status: new > > > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=95419 > > > > > > > > > > case is not a resevred keyword in perl. It is not special in any-way
> > unless
> > > you use features/modules that enable it. Perltidy should treat it like
> it
> > > would any other function. > > > > > > This bug came up in a Fennec unit test where 'case' is an exported > > > function. > > > > > > Sample: > > > > > > case "blah" => sub { {a => 1} }; > > > > > > Gets tidied to: > > > > > > case "blah" => sub { > > > { > > > a => 1; > > > } > > > }; > > > > > > Which is a syntax error with that extra semicolon. > > > > > > Tidyrc used: > > > --indent-columns=4 # size of indentation > > > --nt # no tabs > > > --continuation-indentation=4 # indentation of wrapped lines > > > --maximum-line-length=0 # max line length before wrapping > > > (turn it off) > > > --nooutdent-long-quotes # do not outdent overly long
> quotes
> > > --paren-tightness=2 # no spacing for parentheses > > > --square-bracket-tightness=2 # no spacing for square brackets > > > --brace-tightness=2 # no spacing for hash curly braces > > > --block-brace-tightness=0 # spacing for coderef curly braces > > > --comma-arrow-breakpoints=1 # break long key/value pair lists > > > --break-at-old-comma-breakpoints # this attempts to retain list
> break
> > > points > > > --no-blanks-before-comments # do not insert blank lines before > > > comments > > > --indent-spaced-block-comments # no blanks before comments > > > --nocuddled-else # Do not cuddle else > > > --nospace-for-semicolon # no space before semicolons in
> > loops
> > > --nospace-terminal-semicolon # no space before termonal
> > semicolons
> > > --notrim-qw # Do not mess with qw{} whitespace > > > > > >
> > > >
> >
I'll close this ticket since the problem does not occur in the latest version. -- Steve
Subject: Re: [rt.cpan.org #95419] perltidy incorrectly assumes 'case' is special
Date: Fri, 30 May 2014 07:49:21 -0700
To: bug-Perl-Tidy [...] rt.cpan.org
From: Chad Granum <chad.granum [...] dreamhost.com>
Thanks, sorry for the trouble! On Fri, May 30, 2014 at 7:47 AM, Steve Hancock via RT < bug-Perl-Tidy@rt.cpan.org> wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=95419 > > > I'll close this ticket since the problem does not occur in the latest > version. -- Steve >