Skip Menu |

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

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

People
Owner: Nobody in particular
Requestors: hmeland [...] basefarm.no
Cc:
AdminCc:

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



Subject: Whitespace is sometimes left at end of line with -wbb="="
Date: Wed, 21 Oct 2009 13:13:28 +0200
To: bug-Perl-Tidy [...] rt.cpan.org
From: Harald Meland <hmeland [...] basefarm.no>
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, The following piece of code: if (1) { my $uid = $ENV{ 'ORIG_LOGNAME' } || $ENV{ 'LOGNAME' } || $ENV{ 'REMOTE_USER' } || 'foobar'; } if (2) { my $uid = ($ENV{ 'ORIG_LOGNAME' } || $ENV{ 'LOGNAME' } || $ENV{ 'REMOTE_USER' } || 'foobar'); } will be reformatted to have a final space after the "$uid" in the (1) case, but not in the (2) case, when run through perltidy with the - -wbb="=" (which is part of the perl best practices style): $ perltidy -npro -st -wbb="=" foo.pl | grep -n1 ' $' 1-if (1) { 2: my $uid 3- = $ENV{'ORIG_LOGNAME'} $ Such end-of-line whitespace will cause the CodeLayout::ProhibitTrailingWhitespace perlcritic policy to complain, even though the CodeLayout::RequireTidyCode policy is satisfied. - -- Harald -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iEYEARECAAYFAkre7MkACgkQEcvqpxW9QOZw8wCePmLMHuZ1DqkZ+D5t3QE4MCVA 21oAoMXPotchUwpVyIe+ECqEeOFHXOlo =/AiH -----END PGP SIGNATURE-----
This is fixed in perltidy 20120619.