Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

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

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

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

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



Subject: Module breaks long single-line subs with signature
When using the latest version of this module and perltidy, the signature of single line subroutines are stripped out in some instances. For instance: sub test ($param) {$param->this->is->a->test->that->breaks->perltidysweetened} is tidied to: sub test { $param->this->is->a->test->that->breaks->perltidysweetened; } #__SUB 0 Even when there is no signature present, there is the related issue of the `#__SUB <n>` being added to the file. Greg
Greg, Thanks for the bug report. I am going to release a new version that should fix the issue for sub's without params (the second part of your report). The first part is a bit trickier. I've added tests to show the problem, and I have a fix in mind. Unfortunately, it will take more time than I have at the moment. I'm thinking of changing the way modified subs are identified. Instead of adding "# SUB_1" after the declaration, I'd like to explore changing the sub name. That could greatly simplify things. I'll update when I've had time to explore. -Mark On Wed Aug 12 18:44:11 2015, OSCHWALD wrote: Show quoted text
> When using the latest version of this module and perltidy, the > signature of single line subroutines are stripped out in some > instances. For instance: > > sub test ($param) {$param->this->is->a->test->that->breaks-
> >perltidysweetened}
> > is tidied to: > > sub test { > $param->this->is->a->test->that->breaks->perltidysweetened; > } #__SUB 0 > > Even when there is no signature present, there is the related issue of > the `#__SUB <n>` being added to the file. > > Greg
Thanks!
Just released v1.05 which should fix both of these problems.
On Sat Aug 22 10:20:47 2015, MGRIMES wrote: Show quoted text
> Just released v1.05 which should fix both of these problems.
Thanks! When you get a chance, could you push your changes to GitHub? I do not currently see them there. Greg
Subject: Re: [rt.cpan.org #106398] Module breaks long single-line subs with signature
Date: Mon, 24 Aug 2015 10:45:17 -0400
To: bug-Perl-Tidy-Sweetened [...] rt.cpan.org
From: "Mark Grimes." <mgrimes [...] cpan.org>
Yes. Pushed. On Mon, Aug 24, 2015 at 10:38 AM, Gregory J. Oschwald via RT < bug-Perl-Tidy-Sweetened@rt.cpan.org> wrote: Show quoted text
> Queue: Perl-Tidy-Sweetened > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=106398 > > > On Sat Aug 22 10:20:47 2015, MGRIMES wrote:
> > Just released v1.05 which should fix both of these problems.
> > > Thanks! > > When you get a chance, could you push your changes to GitHub? I do not > currently see them there. > > Greg >