- updated to 20200907
see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md
## 2020 09 07
- Fixed bug git #37, an error when the combination -scbb -csc was used.
It occurs in perltidy versions 20200110, 20200619, and 20200822. What happens is
that when two consecutive lines with isolated closing braces had new side
comments generated by the -csc parameter, a separating newline was missing.
The resulting script will not then run, but worse, if it is reformatted with
the same parameters then closing side comments could be overwritten and data
lost.
This problem was found during automated random testing. The parameter
-scbb is rarely used, which is probably why this has not been reported. Please
upgrade your version.
- Added parameter --non-indenting-braces, or -nib, which prevents
code from indenting one level if it follows an opening brace marked
with a special side comment, '#<<<'. For example,
{ #<<< a closure to contain lexical vars
my $var; # this line does not indent
}
# this line cannot 'see' $var;
This is on by default. If your code happens to have some
opening braces followed by '#<<<', and you
don't want this, you can use -nnib to deactivate it.
- Side comment locations reset at a line ending in a level 0 open
block, such as when a new multi-line sub begins. This is intended to
help keep side comments from drifting to far to the right.
OBS-URL: https://build.opensuse.org/request/show/832723
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Perl-Tidy?expand=0&rev=54
- updated to 20200822
see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md
## 2020 08 22
- Fix RT #133166, encoding not set for -st. Also reported as RT #133171
and git #35.
This is a significant bug in version 20200616 which can corrupt data if
perltidy is run as a filter on encoded text.
**Please upgrade**
- Fix issue RT #133161, perltidy -html was not working on pod
- Fix issue git #33, allow control of space after '->'
- Vertical alignment has been improved. Numerous minor issues have
been fixed.
- Formatting with the -lp option is improved.
- Fixed issue git #32, misparse of bare 'ref' in ternary
- When --assert-tidy is used and triggers an error, the first difference
between input and output files is shown in the error output. This is
a partial response to issue git #30.
OBS-URL: https://build.opensuse.org/request/show/828901
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Perl-Tidy?expand=0&rev=52
- updated to 20200619
see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md
## 2020 06 19
- Added support for Switch::Plain syntax, issue git #31.
- Fixed minor problem where trailing 'unless' clauses were not
getting vertically aligned.
- Added a parameter --logical-padding or -lop to allow logical padding
to be turned off. Requested by git #29. This flag is on by default.
The man pages have examples.
- Added a parameter -kpit=n to control spaces inside of parens following
certain keywords, requested in git#26. This flag is off by default.
- Added fix for git#25, improve vertical alignment for long lists with
varying numbers of items per line.
- calls to the module Perl::Tidy can now capture any output produced
by a debug flag or one of the 'tee' flags through the new 'debugfile' and
'teefile' call parameters. These output streams are rarely used but
they are now treated the same as any 'logfile' stream.
- add option --break-at-old-semicolon-breakpoints', -bos, requested
in RT#131644. This flag will keep lines beginning with a semicolon.
- Added --use-unicode-gcstring to control use of Unicode::GCString for
evaluating character widths of encoded data. The default is
not to use this (--nouse-unicode-gcstring). If this flag is set,
perltidy will look for Unicode::GCString and, if found, will use it
to evaluate character display widths. This can improve displayed
vertical alignment for files with wide characters. It is a nice
feature but it is off by default to avoid conflicting formatting
when there are multiple developers. Perltidy installation does not
require Unicode::GCString, so users wanting to use this feature need
set this flag and also to install Unicode::GCString separately.
- Added --character-encoding=guess or -guess to have perltidy guess
if a file (or other input stream) is encoded as -utf8 or some
other single-byte encoding. This is useful when processing a mixture
of file types, such as utf8 and latin-1.
Please Note: The default encoding has been set to be 'guess'
instead of 'none'. This seems like the best default, since
it allows perltidy work properly with both
utf8 files and older latin-1 files. The guess mode uses Encode::Guess,
which is included in standard perl distributions, and only tries to
guess if a file is utf8 or not, never any other encoding. If the guess is
utf8, and if the file successfully decodes as utf8, then it the encoding
is assumed to be utf8. Otherwise, no encoding is assumed.
If you do not want to use this new default guess mode, or have a
problem with it, you can set --character-encoding=none (the previous
default) or --character-encoding=utf8 (if you deal with utf8 files).
- Specific encodings of input files other than utf8 may now be given, for
example --character-encoding=euc-jp.
- Fix for git#22, Preserve function signature on a single line. An
unwanted line break was being introduced when a closing signature paren
followed a closing do brace.
- Fix RT#132059, the -dac parameter was not working and caused an error exit
- When -utf8 is used, any error output is encoded as utf8
- Fix for git#19, adjust line break around an 'xor'
- Fix for git#18, added warning for missing comma before unknown bare word.
OBS-URL: https://build.opensuse.org/request/show/816296
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Perl-Tidy?expand=0&rev=50
- updated to 20200110
see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md
## 2020 01 10
- This release adds a flag to control the feature RT#130394 (allow short nested blocks)
introduced in the previous release. Unfortunately that feature breaks
RPerl installations, so a control flag has been introduced and that feature is now
off by default. The flag is:
--one-line-block-nesting=n, or -olbn=n, where n is an integer as follows:
-olbn=0 break nested one-line blocks into multiple lines [new DEFAULT]
-olbn=1 stable; keep existing nested-one line blocks intact [previous DEFAULT]
For example, consider this input line:
foreach (@list) { if ($_ eq $asked_for) { last } ++$found }
The new default behavior (-olbn=0), and behavior prior to version 20191203, is to break it into multiple lines:
foreach (@list) {
if ( $_ eq $asked_for ) { last }
++$found;
}
To keep nested one-line blocks such as this on a single line you can add the parameter -olbn=1.
- Fixed issue RT#131288: parse error for un-prototyped constant function without parenthesized
call parameters followed by ternary.
- Fixed issue RT#131360, installation documentation. Added a note that the binary
'perltidy' comes with the Perl::Tidy module. They can both normally be installed with
'cpanm Perl::Tidy'
OBS-URL: https://build.opensuse.org/request/show/762631
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Perl-Tidy?expand=0&rev=48
- updated to 20191203
see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md
## 2019 12 03
- Fixed issue RT#131115: -bli option not working correctly.
Closing braces were not indented in some cases due to a glitch
introduced in version 20181120.
- Fixed issue RT#130394: Allow short nested blocks. Given the following
$factorial = sub { reduce { $a * $b } 1 .. 11 };
Previous versions would always break the sub block because it
contains another block (the reduce block). The fix keeps
short one-line blocks such as this intact.
- Implement issue RT#130640: Allow different subroutine keywords.
Added a flag --sub-alias-list=s or -sal=s, where s is a string with
one or more aliases for 'sub', separated by spaces or commas.
For example,
perltidy -sal='method fun'
will cause the perltidy to treat the words 'method' and 'fun' to be
treated the same as if they were 'sub'.
- Added flag --space-prototype-paren=i, or -spp=i, to control spacing
before the opening paren of a prototype, where i=0, 1, or 2:
i=0 no space
i=1 follow input [current and default]
i=2 always space
Previously, perltidy always followed the input.
For example, given the following input
sub usage();
The result will be:
sub usage(); # i=0 [no space]
sub usage(); # i=1 [default; follows input]
sub usage (); # i=2 [space]
- Fixed issue git#16, minor vertical alignment issue.
- Fixed issue git#10, minor conflict of -wn and -ce
- Improved some vertical alignments involving two lines.
OBS-URL: https://build.opensuse.org/request/show/753928
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Perl-Tidy?expand=0&rev=46
- updated to 20190915
see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md
## 2019 09 15
- fixed issue RT#130344: false warning "operator in print statement"
for "use lib".
- fixed issue RT#130304: standard error output should include filename.
When perltidy error messages are directed to the standard error output
with -se or --standard-error-output, the message lines now have a prefix
'filename:' for clarification in case multiple files
are processed, where 'filename' is the name of the input file. If
input is from the standard input the displayed filename is '<stdin>',
and if it is from a data structure then displayed filename
is '<source_stream>'.
- implement issue RT#130425: check mode. A new flag '--assert-tidy'
will cause an error message if the output script is not identical to
the input script. For completeness, the opposite flag '--assert-untidy'
has also been added. The next item, RT#130297, insures that the script
will exit with a non-zero exit flag if the assertion fails.
- fixed issue RT#130297; the perltidy script now exits with a nonzero exit
status if it wrote to the standard error output. Prevously only fatal
run errors produced a non-zero exit flag. Now, even non-fatal messages
requested with the -w flag will cause a non-zero exit flag. The exit
flag now has these values:
0 = no errors
1 = perltidy could not run to completion due to errors
2 = perltidy ran to completion with error messages
- added warning message for RT#130008, which warns of conflicting input
parameters -iob and -bom or -boc.
- fixed RT#129850; concerning a space between a closing block brace and
opening bracket or brace, as occurs before the '[' in this line:
my @addunix = map { File::Spec::Unix->catfile( @ROOT, @$_ ) } ['b'];
Formerly, any space was removed. Now it is optional, and the output will
follow the input.
- fixed issue git#13, needless trailing whitespace in error message
- fixed issue git#9: if the -ce (--cuddled-else) flag is used,
do not try to form new one line blocks for a block type
specified with -cbl, particularly map, sort, grep
- iteration speedup for unchanged code. Previously, when iterations were
requested, at least two formatting passes were made. Now just a single pass
is made if the formatted code is identical to the input code.
- some improved vertical alignments
OBS-URL: https://build.opensuse.org/request/show/731272
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Perl-Tidy?expand=0&rev=44
- updated to 20171214
see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES
2017 12 14
- RT #123749, partial fix. "Continuation indentation" is removed from lines
with leading closing parens which are part of a call chain.
For example, the call to pack() is is now outdented to the starting
indentation in the following experession:
# OLD
$mw->Button(
-text => "New Document",
-command => \&new_document
)->pack(
-side => 'bottom',
-anchor => 'e'
);
# NEW
$mw->Button(
-text => "New Document",
-command => \&new_document
)->pack(
-side => 'bottom',
-anchor => 'e'
);
This modification improves readability of complex expressions, especially
when the user uses the same value for continuation indentation (-ci=n) and
normal indentation (-i=n). Perltidy was already programmed to
do this but a minor bug was preventing it.
OBS-URL: https://build.opensuse.org/request/show/557138
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Perl-Tidy?expand=0&rev=18
see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES
2017 12 14
- RT #123749, partial fix. "Continuation indentation" is removed from lines
with leading closing parens which are part of a call chain.
For example, the call to pack() is is now outdented to the starting
indentation in the following experession:
# OLD
$mw->Button(
-text => "New Document",
-command => \&new_document
)->pack(
-side => 'bottom',
-anchor => 'e'
);
# NEW
$mw->Button(
-text => "New Document",
-command => \&new_document
)->pack(
-side => 'bottom',
-anchor => 'e'
);
This modification improves readability of complex expressions, especially
when the user uses the same value for continuation indentation (-ci=n) and
normal indentation (-i=n). Perltidy was already programmed to
do this but a minor bug was preventing it.
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Perl-Tidy?expand=0&rev=32
- updated to 20150815
see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES
2015 08 15
- Fixed RT# 105484, Invalid warning about 'else' in 'switch' statement. The
warning happened if a 'case' statement did not use parens.
- Fixed RT# 101547, misparse of // caused error message. Also..
- Fixed RT# 102371, misparse of // caused unwated space in //=
- Fixed RT# 100871, "silent failure of HTML Output on Windows".
Changed calls to tempfile() from:
my ( $fh_tmp, $tmpfile ) = tempfile();
to have the full path name:
my ( $fh_tmp, $tmpfile ) = File::Temp::tempfile()
because of problems in the Windows version reported by Dean Pearce.
- Fixed RT# 99514, calling the perltidy module multiple times with
a .perltidyrc file containing the parameter --output-line-ending
caused a crash. This was a glitch in the memoization logic.
- Fixed RT#99961, multiple lines inside a cast block caused unwanted
continuation indentation.
- RT# 32905, broken handling of UTF-8 strings.
A new flag -utf8 causes perltidy assume UTF-8 encoding for input and
output of an io stream. Thanks to Sebastian Podjasek for a patch.
This feature may not work correctly in older versions of Perl.
It worked in a linux version 5.10.1 but not in a Windows version 5.8.3 (but
otherwise perltidy ran correctly).
OBS-URL: https://build.opensuse.org/request/show/327310
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Perl-Tidy?expand=0&rev=15
- updated to 20140711
- Fixed RT #94902: abbreviation parsing in .perltidyrc files was not
working for multi-line abbreviations. Thanks to Eric Fung for
supplying a patch.
- Fixed RT #95708, misparsing of a hash when the first key was a perl
keyword, causing a semicolon to be incorrectly added.
- Fixed RT #94338 for-loop in a parenthesized block-map. A code block within
parentheses of a map, sort, or grep function was being mistokenized. In
rare cases this could produce in an incorrect error message. The fix will
produce some minor formatting changes. Thanks to Daniel Trizen
discovering and documenting this.
- Fixed RT #94354, excess indentation for stacked tokens. Thanks to
Colin Williams for supplying a patch.
- Added support for experimental postfix dereferencing notation introduced in
perl 5.20. RT #96021.
- Updated documentation to clarify the behavior of the -io flag
in response to RT #95709. You can add -noll or -l=0 to prevent
long comments from being outdented when -io is used.
- Added a check to prevent a problem reported in RT #81866, where large
scripts which had been compressed to a single line could not be formatted
because of a check for VERSION for MakeMaker. The workaround was to
use -nvpl, but this shouldn't be necessary now.
- Fixed RT #96101; Closing brace of anonymous sub in a list was being
OBS-URL: https://build.opensuse.org/request/show/249359
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Perl-Tidy?expand=0&rev=14
- update to 20101217
- added new flag -it=n or --iterations=n
- A configuration file pathname begins with three dots, e.g.
".../.perltidyrc", indicates that the file should be searched for starting
in the current directory and working upwards.
- Added flag --notidy which disables all formatting and causes the input to be
copied unchanged.
- Added prefilters and postfilters in the call to the Tidy.pm module.
- The starting indentation level of sections of code entabbed with -et=n
is correctly guessed if it was also produced with the same -et=n flag. This
keeps the indentation stable on repeated formatting passes within an editor.
Thanks to Sam Kington and Glenn.
- Functions with prototype '&' had a space between the function and opening peren.
- Patch to never put spaces around a bare word in braces beginning with ^
OBS-URL: https://build.opensuse.org/request/show/97023
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/perl-Perl-Tidy?expand=0&rev=5
- added new flag -it=n or --iterations=n
- A configuration file pathname begins with three dots, e.g.
".../.perltidyrc", indicates that the file should be searched for starting
in the current directory and working upwards.
- Added flag --notidy which disables all formatting and causes the input to be
copied unchanged.
- Added prefilters and postfilters in the call to the Tidy.pm module.
- The starting indentation level of sections of code entabbed with -et=n
is correctly guessed if it was also produced with the same -et=n flag. This
keeps the indentation stable on repeated formatting passes within an editor.
Thanks to Sam Kington and Glenn.
- Functions with prototype '&' had a space between the function and opening peren.
- Patch to never put spaces around a bare word in braces beginning with ^
OBS-URL: https://build.opensuse.org/package/show/devel:languages:perl/perl-Perl-Tidy?expand=0&rev=11