Skip Menu |

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

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

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

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



Subject: Anonymous subs with signatures formatted incorrectly
Hi, Steve. I found, that anonymous sub with signature, which contains more, than 2 arguments, is formatted incorrectly. Please, look at the example: get( on_ready => sub ($worker) { $on_ready->end; return; }, on_exit => sub ( $worker, $status ) { return; }, on_data => sub ($data) { $self->_on_data(@_) if $self; return; } ); "on_exit" sub has unwanted line break before "{". Is it possible to avoid this somehow? Perl::Tidy arguments used: --perl-best-practices --tight-secret-operators --continuation-indentation=2 --maximum-line-length=0 --format-skipping --format-skipping-begin="# <<<" --format-skipping-end="# >>>" --converge --nostandard-output --character-encoding=utf8
Subject: Re: [rt.cpan.org #112534] Anonymous subs with signatures formatted incorrectly
Date: Mon, 29 Feb 2016 07:18:06 -0800
To: "bug-Perl-Tidy [...] rt.cpan.org" <bug-Perl-Tidy [...] rt.cpan.org>
From: Steven Hancock <perltidy [...] users.sourceforge.net>
Dmytro, Thanks, I missed that case in testing. I'll post a revised version soon. Steve On Sun, Feb 28, 2016 at 7:26 AM, Dmytro Zagashev via RT < bug-Perl-Tidy@rt.cpan.org> wrote: Show quoted text
> Sun Feb 28 10:26:48 2016: Request 112534 was acted upon. > Transaction: Ticket created by ZDM > Queue: Perl-Tidy > Subject: Anonymous subs with signatures formatted incorrectly > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: ZDM@cpan.org > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=112534 > > > > Hi, Steve. > > I found, that anonymous sub with signature, which contains more, than 2 > arguments, is formatted incorrectly. Please, look at the example: > > get( > on_ready => sub ($worker) { > $on_ready->end; > > return; > }, > on_exit => sub ( $worker, $status ) > { > return; > }, > on_data => sub ($data) { > $self->_on_data(@_) if $self; > > return; > } > ); > > "on_exit" sub has unwanted line break before "{". Is it possible to avoid > this somehow? > > Perl::Tidy arguments used: > > --perl-best-practices > --tight-secret-operators > --continuation-indentation=2 > --maximum-line-length=0 > --format-skipping > --format-skipping-begin="# <<<" > --format-skipping-end="# >>>" > --converge --nostandard-output > --character-encoding=utf8 >
Fixed in version 20160302.