|
|
|
@@ -1,3 +1,326 @@
|
|
|
|
|
-------------------------------------------------------------------
|
|
|
|
|
Sat Jul 12 05:36:54 UTC 2025 - Tina Müller <timueller+perl@suse.de>
|
|
|
|
|
|
|
|
|
|
- updated to 20250711.0.0 (20250711)
|
|
|
|
|
see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md
|
|
|
|
|
|
|
|
|
|
## 2025 07 11
|
|
|
|
|
- Update for issue git #187: add vertical alignment of colons
|
|
|
|
|
used as attribute separators. These colons have token type 'A',
|
|
|
|
|
and this vertical alignment will be on by default (since all
|
|
|
|
|
vertical alignments occur by default). For example:
|
|
|
|
|
# old default
|
|
|
|
|
field $tile_size : param;
|
|
|
|
|
field $bar : reader : writer;
|
|
|
|
|
# new default with alignment of token type 'A'
|
|
|
|
|
field $tile_size : param;
|
|
|
|
|
field $bar : reader : writer;
|
|
|
|
|
This alignment can be turned off to recover the previous formatting
|
|
|
|
|
with --valign-exclusion-list='A', or -vxl='A'.
|
|
|
|
|
- Update for issue git #186: if a closing format skipping comment
|
|
|
|
|
'#>>>' is encountered before any '#<<<' is seen, then format
|
|
|
|
|
skipping is assumed to start with the first line of the file.
|
|
|
|
|
Use --nodetect-format-skipping-from-start or -ndfsfs to prevent
|
|
|
|
|
this check.
|
|
|
|
|
- Added option --code-skipping-from-start, or -csfs. This causes
|
|
|
|
|
code-skipping to begin from the start of a file even though there
|
|
|
|
|
is no starting marker comment, '#<<V'.
|
|
|
|
|
- Fixed a bug involving the --format-skipping option. If a line in
|
|
|
|
|
the skipped code had trailing blanks, then the newline at the end
|
|
|
|
|
of that line was lost.
|
|
|
|
|
- Added a check to insure that format skipping begin and end markers
|
|
|
|
|
strictly alternate along the lines of a file. If these markers
|
|
|
|
|
do not alternate, a warning occurs and formatting is skipped.
|
|
|
|
|
This is intended to help catch errors.
|
|
|
|
|
- For lists which contain here docs and which are formatted with
|
|
|
|
|
the --line-up-parentheses option, the formatting may in some
|
|
|
|
|
cases change to more closely follow the -lp style.
|
|
|
|
|
|
|
|
|
|
-------------------------------------------------------------------
|
|
|
|
|
Mon Jun 16 05:39:09 UTC 2025 - Tina Müller <timueller+perl@suse.de>
|
|
|
|
|
|
|
|
|
|
- updated to 20250616.0.0 (20250616)
|
|
|
|
|
see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md
|
|
|
|
|
|
|
|
|
|
## 2025 06 16
|
|
|
|
|
- Added support for the assigning logical xor ^^= operator
|
|
|
|
|
- For input parameters which allow a paren type to be selected, the
|
|
|
|
|
selection 'f' (function call) now includes functions called with
|
|
|
|
|
a direct arrow before the paren, '->('. This was an oversight which
|
|
|
|
|
has been corrected.
|
|
|
|
|
- A new parameter --break-at-old-comma-types=s, or -boct=s, allows the
|
|
|
|
|
parameter --break-at-old-comma-breakpoints (-boc) to be limited to
|
|
|
|
|
selected container types. For example, -boc -boct='f(' means break
|
|
|
|
|
at old commas but only if they are function call lists.
|
|
|
|
|
- A new parameter --cuddled-paren-brace-weld, or -cpbw, has been added to
|
|
|
|
|
handle issue git #184. This modifies --cuddled-paren-brace by
|
|
|
|
|
preventing a paren and following brace from getting separated in
|
|
|
|
|
certain situations. The difference is illustrated here:
|
|
|
|
|
# perltidy -cpb alone has no effect for this short snippet:
|
|
|
|
|
if ( $Kouter_opening == $Kfirst
|
|
|
|
|
&& $has_tight_paren{$type_prev} )
|
|
|
|
|
{
|
|
|
|
|
$Kref = $Kprev;
|
|
|
|
|
}
|
|
|
|
|
# perltidy -cpb -cpbw keeps the closing paren next to the opening brace:
|
|
|
|
|
if (
|
|
|
|
|
$Kouter_opening == $Kfirst
|
|
|
|
|
&& $has_tight_paren{$type_prev}
|
|
|
|
|
) {
|
|
|
|
|
$Kref = $Kprev;
|
|
|
|
|
}
|
|
|
|
|
- The parameter --maximum-fields-per-table, or -mft, now accepts a string
|
|
|
|
|
input which can limit its application to certain containers. For
|
|
|
|
|
example, -mft='f(1' means that function call lists should be formatted
|
|
|
|
|
with just 1 item per line. It has no effect on other tables. The
|
|
|
|
|
manual has further information.
|
|
|
|
|
- Add option --break-open-compact-parens=s, discussed in git #78.
|
|
|
|
|
This changes the default formatting for lists which would normally
|
|
|
|
|
be displayed compactly on two lines. It causes them to be formatted
|
|
|
|
|
in the same way as long lists, with line breaks at the opening and
|
|
|
|
|
closing parentheses.
|
|
|
|
|
- Add option --skip-formatting-except-id=NAME, or -sfei=NAME, discussed
|
|
|
|
|
in git #183. This allows formatting to apply only to lines tagged
|
|
|
|
|
with #<<< id=NAME, where NAME is a user-defined tag. The special
|
|
|
|
|
variation -sfei='-' can be used to run perltidy with full checking
|
|
|
|
|
but without any formatting changes.
|
|
|
|
|
- A relatively rare problem with the formatting combination -xci and -lp or
|
|
|
|
|
-xlp has been fixed. Some lines had more leading spaces that intended.
|
|
|
|
|
- New option -m added to --dump-mismatched-returns and
|
|
|
|
|
--warn-mismatched-returns. This checks for multiple array
|
|
|
|
|
return sizes. A warning occurs when a sub has multiple returns
|
|
|
|
|
of finite lists with different counts greater than 1, and
|
|
|
|
|
not all of them are matched with calls.
|
|
|
|
|
- Improved support for Object::Pad, see git #182.
|
|
|
|
|
- A limitation on the treatment of lexical subs has been fixed. Previously,
|
|
|
|
|
a lexical sub with the same name as a quote operator would produce a warning,
|
|
|
|
|
and might cause a tokenization error.
|
|
|
|
|
- Here targets in quotes are now located and handled correctly.
|
|
|
|
|
|
|
|
|
|
-------------------------------------------------------------------
|
|
|
|
|
Wed Mar 12 05:43:42 UTC 2025 - Tina Müller <timueller+perl@suse.de>
|
|
|
|
|
|
|
|
|
|
- updated to 20250311.0.0 (20250311)
|
|
|
|
|
see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md
|
|
|
|
|
|
|
|
|
|
## 2025 03 11
|
|
|
|
|
- The options --want-call-parens and --nowant-call-parens were accidentally
|
|
|
|
|
being skipped in version 20250214. This has been fixed.
|
|
|
|
|
- Fixed git #32, a tokenization error with message "hit EOF seeking end of
|
|
|
|
|
quote/pattern" for a function call without paren or arg before a
|
|
|
|
|
ternary operator.
|
|
|
|
|
- A new option --dump-similar-keys will dump hash keys which are
|
|
|
|
|
similar but slightly different to standard output and then exit.
|
|
|
|
|
A related option --warn-similar-keys will report keys with are similar
|
|
|
|
|
to the error output while formatting. Both of these can be controlled
|
|
|
|
|
by parameters which are described in the input manual.
|
|
|
|
|
- A new option --dump-hash-keys will dump all hash keys found by
|
|
|
|
|
perltidy to standard output.
|
|
|
|
|
- The output table for --dump-block-summary has an additional field.
|
|
|
|
|
It is an alternate McCabe complexity count which is the same as
|
|
|
|
|
the previous count except for subs. For subs, the complexity number
|
|
|
|
|
is reduced by the values for any contained anonymous subs.
|
|
|
|
|
- Fix git #181, remove continuation indentation from closing brace
|
|
|
|
|
of an anonymous sub which terminates an input stream.
|
|
|
|
|
|
|
|
|
|
-------------------------------------------------------------------
|
|
|
|
|
Thu Feb 13 16:25:55 UTC 2025 - Tina Müller <timueller+perl@suse.de>
|
|
|
|
|
|
|
|
|
|
- updated to 20250214.0.0 (20250214)
|
|
|
|
|
see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md
|
|
|
|
|
|
|
|
|
|
## 2025 02 14
|
|
|
|
|
- A new option --keep-old-blank-lines-exceptions=s, or --kblx=s,
|
|
|
|
|
allows selected blank lines to be ignored when an input stream
|
|
|
|
|
is read. The parameter s is used to select the blank lines to
|
|
|
|
|
be ignored. This option provides an inverse to other blank line
|
|
|
|
|
parameters. The manual has details. See discussion git #180.
|
|
|
|
|
- A new option --warn-unused-keys, or -wuk, has been added which will
|
|
|
|
|
produce warnings for unused hash keys during formatting. This is similar
|
|
|
|
|
to --dump-unused-keys, which just exits and does not continue formatting.
|
|
|
|
|
A related new parameter --warn-unused-keys-cutoff=N provides control
|
|
|
|
|
over a filter which prevents warnings for keys which appear to be
|
|
|
|
|
members of large hashes used to communicate with external packages.
|
|
|
|
|
The manual has details. See git #177.
|
|
|
|
|
- A new option --pack-opening-types='->' has been added to provide more
|
|
|
|
|
control over breaks of method call chains. It tells perltidy not to
|
|
|
|
|
break at every method call when a chain of calls spans multiple lines.
|
|
|
|
|
This was the behavior in versions prior to 20250105. The default
|
|
|
|
|
starting with 20250105 is to break at each call of a method call chain
|
|
|
|
|
which spans multiple lines. See git #171.
|
|
|
|
|
|
|
|
|
|
-------------------------------------------------------------------
|
|
|
|
|
Sun Jan 5 05:32:07 UTC 2025 - Tina Müller <timueller+perl@suse.de>
|
|
|
|
|
|
|
|
|
|
- updated to 20250105.0.0 (20250105)
|
|
|
|
|
see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md
|
|
|
|
|
|
|
|
|
|
## 2025 01 05
|
|
|
|
|
- If a file consists only of comments, then the starting indentation will
|
|
|
|
|
be guessed from the indentation of the first comment. Previously it would
|
|
|
|
|
be guessed to be zero. Parameter --starting-indentation-level=n can be
|
|
|
|
|
used to specify an indentation and avoid a guess. This issue can
|
|
|
|
|
arise when formatting a block of comments from within an editor.
|
|
|
|
|
- Added missing 'use File::Temp' for -html option. This was causing the
|
|
|
|
|
message: "Undefined subroutine &File::Temp::tempfile called at ..."
|
|
|
|
|
See git #176.
|
|
|
|
|
- A new parameter --dump-unique-keys, or -duk, dumps a list of hash keys
|
|
|
|
|
which appear to be used just once, and do not appear among the quoted
|
|
|
|
|
strings in a file. For example:
|
|
|
|
|
perltidy -duk File.pm >output.txt
|
|
|
|
|
This can help locate misspelled hash keys.
|
|
|
|
|
- Line breaks at long chains of method calls now break at all calls
|
|
|
|
|
with args in parens, as in this example from git #171
|
|
|
|
|
# Old default
|
|
|
|
|
sub bla_p( $value = 42 ) {
|
|
|
|
|
return Mojo::Promise->resolve($value)->then( sub { shift() / 2 } )
|
|
|
|
|
->then( sub { shift() + 6 } )->then( sub { shift() / 2 } )
|
|
|
|
|
->catch( sub { warn shift } );
|
|
|
|
|
}
|
|
|
|
|
# New default
|
|
|
|
|
sub bla_p( $value = 42 ) {
|
|
|
|
|
return Mojo::Promise->resolve($value)
|
|
|
|
|
->then( sub { shift() / 2 } )
|
|
|
|
|
->then( sub { shift() + 6 } )
|
|
|
|
|
->then( sub { shift() / 2 } )
|
|
|
|
|
->catch( sub { warn shift } );
|
|
|
|
|
}
|
|
|
|
|
- Parameter --break-at-old-method-breakpoints, or -bom, has been
|
|
|
|
|
updated to insure that it only applies to lines beginning with
|
|
|
|
|
method calls, as intended. Line breaks for all lines beginning with
|
|
|
|
|
'->', even non-method calls, can be retained by using
|
|
|
|
|
--keep-old-breakpoints_before='->'.
|
|
|
|
|
- Added parameter --multiple-token-tightness=s, or -mutt=s.
|
|
|
|
|
The default value --paren-tightness=1 adds space within the parens
|
|
|
|
|
if, and only if, the container holds multiple tokens. Some perltidy
|
|
|
|
|
tokens may be rather long, and it can be preferable to also space some of
|
|
|
|
|
them as if they were multiple tokens. This can be done with this parameter,
|
|
|
|
|
and it applies to parens as well as square brackets and curly braces.
|
|
|
|
|
For example, the default below has no space within the square brackets:
|
|
|
|
|
# perltidy
|
|
|
|
|
my $rlist = [qw( alpha beta gamma )];
|
|
|
|
|
Spaces can be obtained with:
|
|
|
|
|
# perltidy -mutt='q*'
|
|
|
|
|
my $rlist = [ qw( alpha beta gamma ) ];
|
|
|
|
|
The parameter -mutt='q*' means treat qw and similar quote operators as
|
|
|
|
|
multiple tokens. The manual has details; git #120 has another example.
|
|
|
|
|
- Added parameter --indent-leading-semicolon, -ils; see git #171. When
|
|
|
|
|
this is negated, a line with a leading semicolon does not get the extra
|
|
|
|
|
leading continuation indentation spaces (defined with -ci=n).
|
|
|
|
|
- Space around here doc delimiters follow spacing controls better. For
|
|
|
|
|
example, a space is now added before the closing paren here:
|
|
|
|
|
OLD: (without the here doc):
|
|
|
|
|
push( @script, <<'EOT');
|
|
|
|
|
NEW:
|
|
|
|
|
push( @script, <<'EOT' );
|
|
|
|
|
Also, any spaces between the '<<' and here target are removed (git #174):
|
|
|
|
|
OLD:
|
|
|
|
|
push( @script, << 'EOT');
|
|
|
|
|
NEW:
|
|
|
|
|
push( @script, <<'EOT' );
|
|
|
|
|
- Added parameter --break-at-trailing-comma-types=s, or -btct=s, where
|
|
|
|
|
s is a string which selects trailing commas. For example, -btct='f(b'
|
|
|
|
|
places a line break after all bare trailing commas in function calls.
|
|
|
|
|
The manual has details.
|
|
|
|
|
- Fix git #165, strings beginning with v before => gave an incorrect error
|
|
|
|
|
message.
|
|
|
|
|
- The parameter --add-lone-trailing-commas, -altc, is now on by default.
|
|
|
|
|
This will simplify input for trailing comma operations. Use
|
|
|
|
|
--noadd-lone-trailing-commas, or -naltc to turn it off.
|
|
|
|
|
- More edge cases for adding and deleting trailing commas are now handled
|
|
|
|
|
(git #156).
|
|
|
|
|
- A problem has been fixed in which the addition or deletion of trailing
|
|
|
|
|
commas with the -atc or -dtc flags did not occur due to early convergence
|
|
|
|
|
when the -conv flag was set (git #143).
|
|
|
|
|
- Added parameter --qw-as-function, or -qwaf, discussed in git #164.
|
|
|
|
|
When this parameter is set, a qw list which begins with 'qw(' is
|
|
|
|
|
formatted as if it were a function call with call args being a list
|
|
|
|
|
of comma-separated quoted items. For example, given this input:
|
|
|
|
|
@fields = qw( $st_dev $st_ino $st_mode $st_nlink $st_uid
|
|
|
|
|
$st_gid $st_rdev $st_size $st_atime $st_mtime $st_ctime
|
|
|
|
|
$st_blksize $st_blocks);
|
|
|
|
|
# perltidy -qwaf
|
|
|
|
|
@fields = qw(
|
|
|
|
|
$st_dev $st_ino $st_mode $st_nlink
|
|
|
|
|
$st_uid $st_gid $st_rdev $st_size
|
|
|
|
|
$st_atime $st_mtime $st_ctime $st_blksize
|
|
|
|
|
$st_blocks
|
|
|
|
|
);
|
|
|
|
|
|
|
|
|
|
-------------------------------------------------------------------
|
|
|
|
|
Wed Sep 4 05:34:24 UTC 2024 - Tina Müller <timueller+perl@suse.de>
|
|
|
|
|
|
|
|
|
|
- updated to 20240903.0.0 (20240903)
|
|
|
|
|
see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md
|
|
|
|
|
|
|
|
|
|
## 2024 09 03
|
|
|
|
|
- Add partial support for Syntax::Operator::In and Syntax::Keyword::Match
|
|
|
|
|
(see git #162).
|
|
|
|
|
- Add --timeout-in-seconds=n, or -tos=n. When the standard input supplies
|
|
|
|
|
the input stream, and the input has not been received within n seconds,
|
|
|
|
|
perltidy will end with a timeout message. The intention is to catch
|
|
|
|
|
a situation where perltidy is accidentally invoked without a file to
|
|
|
|
|
process and therefore waits for input from the system standard input
|
|
|
|
|
(stdin), which never arrives. The default is n=10.
|
|
|
|
|
This check can be turned off with -tos=0.
|
|
|
|
|
- Add parameter --closing-side-comment-exclusion-list=string, or
|
|
|
|
|
-cscxl=string, where string is a list of block types to exclude
|
|
|
|
|
for closing side comment operations. Also, closing side comments
|
|
|
|
|
now work for anonymous subs if a --closing-side-comment-list (-cscl)
|
|
|
|
|
is not specified, and when 'asub' is requested with -cscl=asub.
|
|
|
|
|
Use -cscxl=asub to prevent this.
|
|
|
|
|
- Include check for unused constants in --dump-unusual-variables and
|
|
|
|
|
--warn-variable-types (new issue type 'c'). Also expand checks to
|
|
|
|
|
cover variables introduced with 'use vars'.
|
|
|
|
|
- Include signature variables in --dump-unusual-variables and
|
|
|
|
|
--warn-variable-types; see git #158.
|
|
|
|
|
- Add logical xor operator ^^ available in perl version 5.40, as
|
|
|
|
|
noted in git #157.
|
|
|
|
|
- Keyword 'state' now has default space before a paren, like 'my'.
|
|
|
|
|
Previously there was no space and no control. So the default
|
|
|
|
|
is now "state ($x)". This space can be removed with -nsak='state'.
|
|
|
|
|
- Add options --add-lone-trailing-commas, -altc and
|
|
|
|
|
--delete-lone-trailing-commas, -dltc, to provide control over adding
|
|
|
|
|
and deleting the only comma in a list. See discussion in git #143
|
|
|
|
|
and the updated manual.
|
|
|
|
|
- Add options --dump-mismatched-returns (or -dmr) and
|
|
|
|
|
--warn-mismatched-returns (or -wmr). These options report function
|
|
|
|
|
calls where the number of values requested may disagree with sub
|
|
|
|
|
return statements. The -dump version writes the results for a single
|
|
|
|
|
file to standard output and exits:
|
|
|
|
|
perltidy -dmr somefile.pl >results.txt
|
|
|
|
|
The -warn version formats as normal but reports any issues as warnings in
|
|
|
|
|
the error file:
|
|
|
|
|
perltidy -wmr somefile.pl
|
|
|
|
|
The -warn version may be customized with the following additional
|
|
|
|
|
parameters if necessary to avoid needless warnings:
|
|
|
|
|
--warn-mismatched-return-types=s (or -wmrt=s),
|
|
|
|
|
--warn-mismatched-return-exclusion-list=s (or -wmrxl=s)
|
|
|
|
|
where 's' is a control string. These are explained in the manual.
|
|
|
|
|
- Updates for issue git #151:
|
|
|
|
|
(1) --warn-variable-types=u is now okay if a named file is processed.
|
|
|
|
|
(2) --warn-variable-exclusion-list=s now allows leading and/or
|
|
|
|
|
trailing * on variable names to allow a wildcard match. For example
|
|
|
|
|
-wvxl='*_unused' is okay and would match $var1_unused and $var2_unused.
|
|
|
|
|
(3) --dump-unusual-variables now outputs the filename.
|
|
|
|
|
- A option was added to filter unimplemented parameters from perltidy
|
|
|
|
|
configuration files, suggested in git #146. It works like this: if
|
|
|
|
|
a line in the config file begins with three dashes followed by a
|
|
|
|
|
parameter name (rather than two dashes), then the line will be removed
|
|
|
|
|
if the parameter is unknown. Otherwise, a dash will be removed to make
|
|
|
|
|
the line valid.
|
|
|
|
|
- Parameters --dump-mismatched-args (or -dma) and
|
|
|
|
|
--warn-mismatched-args (or -wma) have been updated to catch more
|
|
|
|
|
arg count issues.
|
|
|
|
|
- Fixed issue git #143, extend -add-trailing-commas to apply to a list
|
|
|
|
|
with just a fat comma.
|
|
|
|
|
- The minimum perl version is 5.8.1. Previously it was 5.8.0, which was
|
|
|
|
|
not correct because of the use of utf8::is_utf8.
|
|
|
|
|
- Fixed issue git #142, test failure installing on perl versions before
|
|
|
|
|
version 5.10. The error caused the new parameter
|
|
|
|
|
-interbracket-arrow-style=s not to work. Except for this limitation,
|
|
|
|
|
Version 20240511 will work on older perl versions.
|
|
|
|
|
|
|
|
|
|
-------------------------------------------------------------------
|
|
|
|
|
Sat May 11 03:07:59 UTC 2024 - Tina Müller <timueller+perl@suse.de>
|
|
|
|
|
|
|
|
|
|