Index | index by Group | index by Distribution | index by Vendor | index by creation date | index by Name | Mirrors | Help | Search |
Name: perl-Perl-Tidy | Distribution: openSUSE Tumbleweed |
Version: 20240511.0.0 | Vendor: openSUSE |
Release: 1.2 | Build date: Sat May 11 05:07:59 2024 |
Group: Unspecified | Build host: reproducible |
Size: 3924178 | Source RPM: perl-Perl-Tidy-20240511.0.0-1.2.src.rpm |
Packager: http://bugs.opensuse.org | |
Url: https://metacpan.org/release/Perl-Tidy | |
Summary: Indent and reformat perl scripts |
This module makes the functionality of the perltidy utility available to perl scripts. Any or all of the input parameters may be omitted, in which case the @ARGV array will be used to provide input parameters as described in the perltidy(1) man page. For example, the perltidy script is basically just this: use Perl::Tidy; Perl::Tidy::perltidy(); The call to *perltidy* returns a scalar *$error_flag* which is TRUE if an error caused premature termination, and FALSE if the process ran to normal completion. Additional discuss of errors is contained below in the ERROR HANDLING section.
GPL-2.0-or-later
* Sat May 11 2024 Tina Müller <timueller+perl@suse.de> - updated to 20240511 see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md [#]# 2024 05 11 - The option --valign-signed-numbers, or -vsn is now the default. It was introduced in the previous release has been found to significantly improve the overall appearance of columns of signed and unsigned numbers. See the previous Change Log entry for an example. This will change the formatting in scripts with columns of vertically aligned signed and unsigned numbers. Use -nvsn to turn this option off and avoid this change. - Previously, a line break was made before a short concatenated terminal quoted string, such as "\n", if the previous line had a greater starting indentation. The break is now placed after the short quote. This keeps code a little more compact. For example: [#] old rule: break before "\n" here because '$name' has more indentation: my $html = $this->SUPER::genObject( $query, $bindNode, $field . ":$var", $name, "remove", "UNCHECKED" ) . "\n"; [#] new rule: break after a short terminal quote like "\n" for compactness; my $html = $this->SUPER::genObject( $query, $bindNode, $field . ":$var", $name, "remove", "UNCHECKED" ) . "\n"; - The option --delete-repeated-commas is now the default. It makes the following checks and changes: - Repeated commas like ',,' are removed with a warning - Repeated fat commas like '=> =>' are removed with a warning - The combination '=>,' produces a warning but is not changed These warnings are only output if --warning-output, or -w, is set. Use --nodelete-repeated-commas, or -ndrc, to retain repeated commas. - The operator ``**=`` now has spaces on both sides by default. Previously, there was no space on the left. This change makes its spacing the same as all other assignment operators. The previous behavior can be obtained with the parameter setting -nwls='**='. - The option --file-size-order, or -fso is now the default. When perltidy is given a list of multiple filenames to process, they are sorted by size and processed in order of increasing size. This can significantly reduce memory usage by Perl. This option has always been used in testing, where typically several jobs each operating on thousands of filenames are running at the same time and competing for system resources. If this option is not wanted for some reason, it can be deactivated with -nfso. - In the option --dump-block-summary, the number of sub arguments indicated for each sub now includes any leading object variable passed with an arrow-operator call. Previously the count would have been decreased by one in this case. This change is needed for compatibility with future updates. - Fix issue git #138 involving -xlp (--extended-line-up-parentheses). When multiple-line quotes and regexes have long secondary lines, these line lengths could influencing some spacing and indentation, but they should not have since perltidy has no control over their indentation. This has been fixed. This will mainly influence code which uses -xlp and has long multi-line quotes. - Add option --minimize-continuation-indentation, -mci (see git #137). This flag allows perltidy to remove continuation indentation in some special cases where it is not really unnecessary. For a simple example, the default formatting for the following snippet is: [#] perltidy -nmci $self->blurt( "Error: No INPUT definition for type '$type', typekind '" . $type->xstype . "' found" ); The second and third lines are one level deep in a container, and are also statement continuations, so they get indented by the sum of the -i value and the -ci value. If this flag is set, the indentation is reduced by -ci spaces, giving [#] perltidy -mci $self->blurt( "Error: No INPUT definition for type '$type', typekind '" . $type->xstype . "' found" ); This situation is relatively rare except in code which has long quoted strings and the -nolq flag is also set. This flag is currently off by default, but it could become the default in a future version. - Add options --dump-mismatched-args (or -dma) and - -warn-mismatched-arg (or -wma). These options look for and report instances where the number of args expected by a sub appear to differ from the number passed to the sub. The -dump version writes the results for a single file to standard output and exits: perltidy -dma somefile.pl >results.txt The -warn version formats as normal but reports any issues as warnings in the error file: perltidy -wma somefile.pl The -warn version may be customized with the following additional parameters if necessary to avoid needless warnings: - -warn-mismatched-arg-types=s (or -wmat=s), - -warn-mismatched-arg-exclusion-list=s (or -wmaxl=s), and - -warn-mismatched-arg-undercount-cutoff=n (or -wmauc=n). - -warn-mismatched-arg-overcount-cutoff=n (or -wmaoc=n). These are explained in the manual. - Add option --valign-wide-equals, or -vwe, for issue git #135. Setting this parameter causes the following assignment operators = **= += *= &= <<= &&= -= /= |= >>= ||= //= .= %= ^= x= to be aligned vertically with the ending = all aligned. For example, here is the default formatting of a snippet of code: $str .= SPACE x $total_pad_count; $str_len += $total_pad_count; $total_pad_count = 0; $str .= $rfields->[$j]; $str_len += $rfield_lengths->[$j]; And here is the same code formatted with -vwe: [#] perltidy -vwe $str .= SPACE x $total_pad_count; $str_len += $total_pad_count; $total_pad_count = 0; $str .= $rfields->[$j]; $str_len += $rfield_lengths->[$j]; This option currently is off by default to avoid changing existing formatting. - Added control --delete-interbracket-arrows, or -dia, to delete optional hash ref and array ref arrows between brackets as in the following expression (see git #131) return $self->{'commandline'}->{'arg_list'}->[0]->[0]->{'hostgroups'}; [#] perltidy -dia gives: return $self->{'commandline'}{'arg_list'}[0][0]{'hostgroups'}; Added the opposite control --aia-interbracket-arrows, or -aia, to add arrows. So applied to the previous line the arrows are restored: [#] perltidy -aia return $self->{'commandline'}->{'arg_list'}->[0]->[0]->{'hostgroups'}; The manual describes additional controls for adding and deleting just selected interbracket arrows. * Fri Mar 08 2024 Tina Müller <tina.mueller@suse.com> - Fix disabling of __perllib_provides * Fri Feb 02 2024 Tina Müller <timueller+perl@suse.de> - updated to 20240202 see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md [#]# 2024 02 02 - Added --valign-signed-numbers, or -vsn. This improves the appearance of columns of numbers by aligning leading algebraic signs. For example: [#] perltidy -vsn my $xyz_shield = [ [ -0.060, -0.060, 0. ], [ 0.060, -0.060, 0. ], [ 0.060, 0.060, 0. ], [ -0.060, 0.060, 0. ], [ -0.0925, -0.0925, 0.092 ], [ 0.0925, -0.0925, 0.092 ], [ 0.0925, 0.0925, 0.092 ], [ -0.0925, 0.0925, 0.092 ], ]; [#] perltidy -nvsn (current DEFAULT) my $xyz_shield = [ [ -0.060, -0.060, 0. ], [ 0.060, -0.060, 0. ], [ 0.060, 0.060, 0. ], [ -0.060, 0.060, 0. ], [ -0.0925, -0.0925, 0.092 ], [ 0.0925, -0.0925, 0.092 ], [ 0.0925, 0.0925, 0.092 ], [ -0.0925, 0.0925, 0.092 ], ]; This new option works well but is currently OFF to allow more testing and fine-tuning. It is expected to be activated in a future release. - Added --dump-mixed-call-parens (-dmcp ) which will dump a list of operators which are sometimes followed by parens and sometimes not. This can be useful for developing a uniform style for selected operators. Issue git #128. For example perltidy -dmcp somefile.pl >out.txt produces lines like this, where the first number is the count of uses with parens, and the second number is the count without parens. k:caller:2:1 k:chomp:3:4 k:close:7:4 - Added --want-call-parens=s (-wcp=s) and --nowant-call-parens=s (-nwcp=s) options which will warn of paren uses which do not match a selected style. The manual has details. But for example, perltidy -wcp='&' somefile.pl will format as normal but warn if any user subs are called without parens. - Added --dump-unusual-variables (-duv) option to dump a list of variables with certain properties of interest. For example perltidy -duv somefile.pl >vars.txt produces a file with lines which look something like 1778:u: my $input_file 6089:r: my $j: reused - see line 6076 The values on the line which are separated by colons are: line number - the number of the line of the input file issue - a single letter indicating the issue, see below variable name - the name of the variable, preceded by a keyword note - an optional note referring to another line The issue is indicated by a letter which may be one of: r: reused variable name s: sigil change but reused bareword p: lexical variable with scope in multiple packages u: unused variable This is very useful for locating problem areas and bugs in code. - Added a related flag --warn-variable-types=string (-wvt=string) option to warn if certain types of variables are found in a script. The types are a space-separated string which may include 'r', 's', and 'p' but not 'u'. For example perltidy -wvt='r s' somefile.pl will check for and warn if any variabls of type 'r', or 's' are seen, but not 'p'. All possible checks may be indicated with a '*' or '1': perltidy -wvt='*' somefile.pl The manual has further details. - All parameters taking integer values are now checked for out-of-range values before processing starts. When a maximum or maximum range is exceeded, the new default behavior is to write a warning message, reset the value to its default setting, and continue. This default behavior can be changed with the new parameter - -integer-range-check=n, or -irc=n, as follows: n=0 skip check completely (for stress-testing perltidy only) n=1 reset bad values to defaults but do not issue a warning n=2 reset bad values to defaults and issue a warning [DEFAULT] n=3 stop immediately if any values are out of bounds The settings n=0 and n=1 are mainly useful for testing purposes. - The --dump-block-summary (-dbs) option now includes the number of sub args in the 'type' column. For example, 'sub(9)' indicates a sub with 9 args. Subs whose arg count cannot easily be determined are indicated as 'sub(*)'. The count does not include a leading '$self' or '$class' arg. - Added flag --space-signature-paren=n, or -ssp=n (issue git #125). This flag works the same as the existing flag --space-prototype-paren=n except that it applies to the space before the opening paren of a sub signature instead of a sub prototype. Previously, there was no control over this (a space always occurred). For example, given the following line: sub circle( $xc, $yc, $rad ); The following results can now be obtained, according to the value of n: sub circle( $xc, $yc, $rad ); # n=0 [no space] sub circle( $xc, $yc, $rad ); # n=1 [default; same as input] sub circle ( $xc, $yc, $rad ); # n=2 [space] The spacing in previous versions of perltidy corresponded to n=2 (always a space). The new default value, n=1, will produce a space if and only if there was a space in the input text. - The --dump-block-summary option can report an if-elsif-elsif-.. chain as a single line item with the notation -dbt='elsif3', for example, where the '3' is an integer which specifies the minimum number of elsif blocks required for a chain to be reported. The manual has details. - Fix problem c269, in which the new -ame parameter could incorrectly emit an else block when two elsif blocks were separated by a hanging side comment (a very rare situation). - When braces are detected to be unbalanced, an attempt is made to localize the error by comparing the indentation at closing braces with their actual nesting levels. This can be useful for files which have previously been formatted by perltidy. To illustrate, a test was made in which the closing brace at line 30644 was commented out in a file with a total of over 62000 lines. The new error message is Final nesting depth of '{'s is 1 The most recent un-matched '{' is on line 6858 ... Table of nesting level differences at closing braces. This might help localize brace errors if the file was previously formatted. line: (brace level) - (level expected from old indentation) 30643: 0 30645: 1 Previously, the error file only indicated that the error in this case was somewhere after line 6858, so the new table is very helpful. Closing brace indentation is checked because it is unambiguous and can be done very efficiently. - The -DEBUG option no longer automatically also writes a .LOG file. Use --show-options if the .LOG file is needed. - The run time of this version with all new options in use is no greater than that of the previous version thanks to optimization work. * Wed Sep 13 2023 Tina Müller <timueller+perl@suse.de> - updated to 20230912 see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md [#]# 2023 09 12 - Fix for git #124: remove a syntax error check which could cause an incorrect error message when List::Gather::gather was used. * Sat Sep 09 2023 Tina Müller <timueller+perl@suse.de> - updated to 20230909 see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md [#]# 2023 09 09 - Added new parameters -wme, or --warn-missing-else, and -ame, or --add-missing else. The parameter -wme tells perltidy to issue a warning if an if-elsif-... chain does not end in an else block. The parameter -ame tells perltidy to insert an else block at the end of such a chain if there is none. For example, given the following snippet: if ( $level == 3 ) { $val = $global{'section'} } elsif ( $level == 2 ) { $val = $global{'chapter'} } [#] perltidy -ame if ( $level == 3 ) { $val = $global{'section'} } elsif ( $level == 2 ) { $val = $global{'chapter'} } else { [#]#FIXME - added with perltidy -ame } The resulting code should be carefully reviewed, and the ##FIXME comment should be updated as appropriate. The text of the ##FIXME comment can be changed with parameter -amec=s, where 's' is the comment to mark the new else block. The man pages have more details. - The syntax of the parameter --use-feature=class, or -uf=class, which new in the previous release, has been changed slightly for clarity. The default behavior, which occurs if this flag is not entered, is to automatically try to handle both old and new uses of the keywords 'class', 'method', 'field', and 'ADJUST'. To force these keywords to only follow the -use feature 'class' syntax, enter --use-feature=class. To force perltidy to ignore the -use feature 'class' syntax, enter - -use-feature=noclass. - Issue git #122. Added parameter -lrt=n1:n2, or --line-range-tidy=n1:n2 to limit tidy operations to a limited line range. Line numbers start with 1. This parameter is mainly of interest to editing programs which drive perltidy. The man pages have details. - Some fairly rare instances of incorrect spacing have been fixed. The problem was that the tokenizer being overly conservative in marking terms as possible filehandles or indirect objects. This causes the space after the possible filehandle to be frozen to its input value in order not to introduce an error in case Perl had to guess. The problem was fixed by having the tokenizer look ahead for operators which can eliminate the uncertainty. To illustrate, in the following line the term ``$d`` was previously marked as a possible filehandle, so no space was added after it. print $d== 1 ? " [ON]\n" : $d ? " [$d]\n" : "\n"; ^ In the current version, the next token is seen to be an equality, so ``$d`` is marked as an ordinary identifier and normal spacing rules can apply: print $d == 1 ? " [ON]\n" : $d ? " [$d]\n" : "\n"; ^ - This version runs 7 to 10 percent faster than the previous release on large files, depending on options and file type. Much of the gain comes from streamlined I/O operations. - This version was stress-tested for many cpu hours with random input parameters. No failures to converge, internal fault checks, undefined variable references or other irregularities were seen. * Sun Jul 02 2023 Tina Müller <timueller+perl@suse.de> - updated to 20230701 see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md [#]# 2023 07 01 - Issue git #121. Added parameters -xbt, or --extended-block-tightness, and -xbtl=s, or --extended-block-tightness-list=s, to allow certain small code blocks to have internal spacing controlled by - bbt=n rather than -bt=n. The man pages have details. - Issue git #118. A warning will be issued if a duplicate format-skipping starting marker is seen within a format-skipping section. The same applies to duplicate code-skipping starting markers within code-skipping sections. - Issue git #116. A new flag --valign-if-unless, -viu, was added to allow postfix 'unless' terms to align with postfix 'if' terms. The default remains not to do this. - Fixed git #115. In the two most recent CPAN releases, when the Perl::Tidy module was called with the source pointing to a file, but no destination specified, the output went to the standard output instead of to a file with extension ``.tdy``, as it should have. This has been fixed. - Fixed git #110, add missing documentation for new options - cpb and -bfvt=n. These work in version 20230309 but the pod documentation was missing and has been added. - Fixed an undefined reference message when running with - -dump-block-summary on a file without any subs or other selected block types. - Add parameter -ipc, or --ignore-perlcritic-comments. Perltidy, by default, will look for side comments beginning with ``## no critic`` and ignore their lengths when making line break decisions, even if the user has not set ``-iscl``. The reason is that an unwanted line break can make these special comments ineffective in controlling ``perlcritic``. The parameter -ipc can be set if, for some reason, this is not wanted. - Some minor issues with continuation indentation have been fixed. Most scripts will remain unchanged. The main change is that block comments which occur just before a closing brace, bracket or paren now have an indentation which is independent of the existance of an optional comma or semicolon. Previously, adding or deleting an optional trailing comma could cause their indentation to jump. Also, indentation of comments within ternary statements has been improved. For additonal details see: https://github.com/perltidy/perltidy/blob/master/docs/ci_update.md - This version was stress-tested for many cpu hours with random input parameters. No failures to converge, internal fault checks, undefined variable references or other irregularities were seen. - This version runs several percent faster than the previous release on large files. * Thu Mar 09 2023 Tina Müller <timueller+perl@suse.de> - updated to 20230309 see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md [#]# 2023 03 09 - No significant bugs have been found since the last release to CPAN. Several minor issues have been fixed, and some new parameters have been added, as follows: - Added parameter --one-line-block-exclusion-list=s, or -olbxl=s, where s is a list of block types which should not automatically be turned into one-line blocks. This implements the issue raised in PR #111. The list s may include any of the words 'sort map grep eval', or it may be '*' to indicate all of these. So for example to prevent multi-line 'eval' blocks from becoming one-line blocks, the command would be -olbxl='eval'. - For the -b (--backup-and-modify-in-place) option, the file timestamps are changing (git #113, rt#145999). First, if there are no formatting changes to an input file, it will keep its original modification time. Second, any backup file will keep its original modification time. This was previously true for --backup-method=move but not for the default - -backup-method=copy. The purpose of these changes is to avoid triggering Makefile operations when there are no actual file changes. If this causes a problem please open an issue for discussion on github. - A change was made to the way line breaks are made at the '.' operator when the user sets -wba='.' to requests breaks after a '.' ( this setting is not recommended because it can be hard to read ). The goal of the change is to make switching from breaks before '.'s to breaks after '.'s just move the dots from the end of lines to the beginning of lines. For example: [#] default and recommended (--want-break-before='.'): $output_rules .= ( 'class' . $dir . '.stamp: $(' . $dir . '_JAVA)' . "\n" . "\t" . '$(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) ' . '$(JAVACFLAGS) $?' . "\n" . "\t" . 'echo timestamp > class' . $dir . '.stamp' . "\n" ); [#] perltidy --want-break-after='.' $output_rules .= ( 'class' . $dir . '.stamp: $(' . $dir . '_JAVA)' . "\n" . "\t" . '$(CLASSPATH_ENV) $(JAVAC) -d $(JAVAROOT) ' . '$(JAVACFLAGS) $?' . "\n" . "\t" . 'echo timestamp > class' . $dir . '.stamp' . "\n" ); For existing code formatted with -wba='.', this may cause some changes in the formatting of code with long concatenation chains. - Added option --use-feature=class, or -uf=class, for issue rt #145706. This adds keywords 'class', 'method', 'field', and 'ADJUST' in support of this feature which is being tested for future inclusion in Perl. An effort has been made to avoid conflicts with past uses of these words, especially 'method' and 'class'. The default setting is --use-feature=class. If this causes a conflict, this option can be turned off by entering -uf=' '. In other words, perltidy should work for both old and new uses of these keywords with the default settings, but this flag is available if a conflict arises. - Added option -bfvt=n, or --brace-follower-vertical-tightness=n, for part of issue git #110. For n=2, this option looks for lines which would otherwise be, by default, } or .. and joins them into a single line } or .. where the or can be one of a number of logical operators or if unless. The default is not to do this and can be indicated with n=1. - Added option -cpb, or --cuddled-paren-brace, for issue git #110. This option will cause perltidy to join two lines which otherwise would be, by default, ) { into a single line ) { - Some minor changes to existing formatted output may occur as a result of fixing minor formatting issues with edge cases. This is especially true for code which uses the -lp or -xlp styles. - Added option -dbs, or --dump-block-summary, to dump summary information about code blocks in a file to standard output. The basic command is: perltidy -dbs somefile.pl >blocks.csv Instead of formatting ``somefile.pl``, this dumps the following comma-separated items describing its blocks to the standard output: filename - the name of the file line - the line number of the opening brace of this block line_count - the number of lines between opening and closing braces code_lines - the number of lines excluding blanks, comments, and pod type - the block type (sub, for, foreach, ...) name - the block name if applicable (sub name, label, asub name) depth - the nesting depth of the opening block brace max_change - the change in depth to the most deeply nested code block block_count - the total number of code blocks nested in this block mccabe_count - the McCabe complexity measure of this code block This can be useful for code restructuring. The man page for perltidy has more information and describes controls for selecting block types. - This version was stress-tested for over 100 cpu hours with random input parameters. No failures to converge, internal fault checks, undefined variable references or other irregularities were seen. - This version runs a few percent faster than the previous release on large files due to optimizations made with the help of Devel::NYTProf. * Sat Nov 12 2022 Tina Müller <timueller+perl@suse.de> - updated to 20221112 see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md [#]# 2022 11 12 - Fix rt #145095, undef warning in Perl before 5.12. Version 20221112 is identical to 2022111 except for this fix for older versions of Perl. - No significant bugs have been found since the last release to CPAN. Several minor issues have been fixed, and some new parameters have been added, as follows: - Fixed rare problem with irregular indentation involving --cuddled-else, usually also with the combination -xci and -lp. Reported in rt #144979. - Add option --weld-fat-comma (-wfc) for issue git #108. When -wfc is set, along with -wn, perltidy is allowed to weld an opening paren to an inner opening container when they are separated by a hash key and fat comma (=>). For example: [#] perltidy -wn elf->call_method( method_name_foo => { some_arg1 => $foo, some_other_arg3 => $bar->{'baz'}, } ); [#] perltidy -wn -wfc elf->call_method( method_name_foo => { some_arg1 => $foo, some_other_arg3 => $bar->{'baz'}, } ); This flag is off by default. - Fix issue git #106. This fixes some edge cases of formatting with the combination -xlp -pt=2, mainly for two-line lists with short function names. One indentation space is removed to improve alignment: [#] OLD: perltidy -xlp -pt=2 is($module->VERSION, $expected, "$main_module->VERSION matches $module->VERSION ($expected)"); [#] NEW: perltidy -xlp -pt=2 is($module->VERSION, $expected, "$main_module->VERSION matches $module->VERSION ($expected)"); - Fix for issue git #105, incorrect formatting with 5.36 experimental for_list feature. - Fix for issue git #103. For parameter -b, or --backup-and-modify-in-place, the default backup method has been changed to preserve the inode value of the file being formatted. If this causes a problem, the previous method is available and can be used by setting -backup-mode='move', or - bm='move'. The new default corresponds to -bm='copy'. The difference between the two methods is as follows. For the older method, - bm='move', the input file was moved to the backup, and a new file was created for the formatted output. This caused the inode to change. For the new default method, -bm='copy', the input is copied to the backup and then the input file is reopened and rewritten. This preserves the file inode. Tests have not produced any problems with this change, but before using the --backup-and-modify-in-place parameter please verify that it works correctly in your environment and operating system. The initial update for this had an error which was caught and fixed in git #109. - Fix undefined value message when perltidy -D is used (git #104) - Fixed an inconsistency in html colors near pointers when -html is used. Previously, a '->' at the end of a line got the 'punctuation color', black by default but a '->' before an identifier got the color of the following identifier. Now all pointers get the same color, which is black by default. Also, previously a word following a '->' was given the color of a bareword, black by default, but now it is given the color of an identifier. - Fixed incorrect indentation of any function named 'err'. This was due to some old code from when "use feature 'err'" was valid. [#] OLD: my ($curr) = current(); err (@_); [#] NEW: my ($curr) = current(); err(@_); - Added parameter --delete-repeated-commas (-drc) to delete repeated commas. This is off by default. For example, given: ignoreSpec( $file, "file",, \%spec, \%Rspec ); [#] perltidy -drc: ignoreSpec( $file, "file", \%spec, \%Rspec ); - Add continuation indentation to long C-style 'for' terms; i.e. [#] OLD for ( $j = $i - $shell ; $j >= 0 && ++$ncomp && $array->[$j] gt $array->[ $j + $shell ] ; $j -= $shell ) [#] NEW for ( $j = $i - $shell ; $j >= 0 && ++$ncomp && $array->[$j] gt $array->[ $j + $shell ] ; $j -= $shell ) This will change some existing formatting with very long 'for' terms. - The following new parameters are available for manipulating trailing commas of lists. They are described in the manual. - -want-trailing-commas=s, -wtc=s - -add-trailing-commas, -atc - -delete-trailing-commas, -dtc - -delete-weld-interfering-commas, -dwic - Files with errors due to missing, extra or misplaced parens, braces, or square brackets are now written back out verbatim, without any attempt at formatting. - This version runs 10 to 15 percent faster than the previous release on large files due to optimizations made with the help of Devel::NYTProf. - This version was stress-tested for over 200 cpu hours with random input parameters. No failures to converge, internal fault checks, undefined variable references or other irregularities were seen. * Tue Jun 14 2022 Tina Müller <timueller+perl@suse.de> - updated to 20220613 see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md [#]# 2022 06 13 - No significant bugs have been found since the last release but users of programs which call the Perl::Tidy module should note the first item below, which changes a default setting. The main change to existing formatting is the second item below, which adds vertical alignment to 'use' statements. - The flag --encode-output-strings, or -eos, is now set 'on' by default. This has no effect on the use of the 'perltidy' binary script, but could change the behavior of some programs which use the Perl::Tidy module on files encoded in UTF-8. If any problems are noticed, an emergency fix can be made by reverting to the old default by setting -neos. For an explanation of why this change needs to be made see: https://github.com/perltidy/perltidy/issues/92 https://github.com/perltidy/perltidy/blob/master/docs/eos_flag.md - Added vertical alignment for qw quotes and empty parens in 'use' statements (see issue #git 93). This new alignment is 'on' by default and will change formatting as shown below. If this is not wanted it can be turned off with the parameter -vxl='q' (--valign-exclude-list='q'). [#] old default, or -vxl='q' use Getopt::Long qw(GetOptions); use Fcntl qw(O_RDONLY O_WRONLY O_EXCL O_CREAT); use Symbol qw(gensym); use Exporter (); [#] new default use Getopt::Long qw(GetOptions); use Fcntl qw(O_RDONLY O_WRONLY O_EXCL O_CREAT); use Symbol qw(gensym); use Exporter (); - The parameter -kbb (--keep-break-before) now ignores a request to break before an opening token, such as '('. Likewise, -kba (--keep-break-after) now ignores a request to break after a closing token, such as ')'. This change was made to avoid a rare instability discovered in random testing. - Previously, if a -dsc command was used to delete all side comments, then any special side comments for controlling non-indenting braces got deleted too. Now, these control side comments are retained when -dsc is set unless a -nnib (--nonon-indenting-braces) flag is also set to deactivate them. - This version runs about 10 percent faster on large files than the previous release due to optimizations made with the help of Devel::NYTProf. Much of the gain came from faster processing of blank tokens and comments. - This version of perltidy was stress-tested for many cpu hours with random input parameters. No failures to converge, internal fault checks, undefined variable references or other irregularities were seen. * Wed Feb 16 2022 Tina Müller <timueller+perl@suse.de> - updated to 20220217 see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md [#]# 2022 02 17 - A new flag, --encode-output-strings, or -eos, has been added to resolve issue git #83. This issue involves the interface between Perl::Tidy and calling programs, and Code::TidyAll (tidyall) in particular. The problem is that perltidy by default returns decoded character strings, but tidyall expects encoded strings. This flag provides a fix for that. So, tidyall users who process encoded (utf8) files should update to this version of Perl::Tidy and use -eos for tidyall. For further info see: https://github.com/houseabsolute/perl-code-tidyall/issues/84, and https://github.com/perltidy/perltidy/issues/83 If there are other applications having utf8 problems at the interface with Perl::Tidy, this flag probably may need to be set. - The default value of the new flag, --encode-output-strings, -eos, is currently - neos BUT THIS MAY CHANGE in a future release because the current default is inconvenient. So authors of programs which receive character strings back from Perl::Tidy should set this flag, if necessary, to avoid any problems when the default changes. For more information see the above links and the Perl::Tidy man pages for example coding. - The possible values of the string 's' for the flag '--character-encoding=s' have been limited to 'utf8' (or UTF-8), 'none', or 'guess'. Previously an arbitrary encoding could also be specified, but as a result of discussions regarding git #83 it became clear that this could cause trouble since the output encoding was still restricted to UTF-8. Users who need to work in other encodings can write a short program calling Perl::Tidy with pre- and post-processing to handle encoding/decoding. - A new flag --break-after-labels=i, or -bal=i, was added for git #86. This controls line breaks after labels, to provide a uniform style, as follows: - bal=0 follows the input line breaks [DEFAULT] - bal=1 always break after a label - bal=2 never break after a label For example: [#] perltidy -bal=1 INIT: { $xx = 1.234; } [#] perltidy -bal=2 INIT: { $xx = 1.234; } - Fix issue git #82, an error handling something like ${bareword} in a possible indirect object location. Perl allows this, now perltidy does too. - The flags -kbb=s or --keep-old-breakpoints-before=s, and its counterpart - kba=s or --keep-old-breakpoints-after=s have expanded functionality for the container tokens: { [ ( } ] ). The updated man pages have details. - Two new flags have been added to provide finer vertical alignment control, - -valign-exclusion-list=s (-vxl=s) and --valign-inclusion-list=s (-vil=s). This has been requested several times, most recently in git #79, and it finally got done. For example, -vil='=>' means just align on '=>'. - A new flag -gal=s, --grep-alias-list=s, has been added as suggested in git #77. This allows code blocks passed to list operator functions to be formatted in the same way as a code block passed to grep, map, or sort. By default, the following list operators in List::Util are included: all any first none notall reduce reductions They can be changed with the flag -gaxl=s, -grep-alias-exclusion-list=s - A new flag -xlp has been added which can be set to avoid most of the limitations of the -lp flag regarding side comments, blank lines, and code blocks. See the man pages for more info. This fixes git #64 and git #74. The older -lp flag still works. - A new flag -lpil=s, --line-up-parentheses-inclusion-list=s, has been added as an alternative to -lpxl=s, --line-up-parentheses-exclusion-list=s. It supplies equivalent information but is much easier to describe and use. It works for both the older -lp version and the newer -xlp. - The coding for the older -lp flag has been updated to avoid some problems and limitations. The new coding allows the -lp indentation style to mix smoothly with the standard indentation in a single file. Some problems where -lp and -xci flags were not working well together have been fixed, such as happened in issue rt140025. As a result of these updates some minor changes in existing code using the -lp style may occur. - This version of perltidy was stress-tested for many cpu hours with random input parameters. No failures to converge, internal fault checks, undefined variable references or other irregularities were seen. - Numerous minor fixes have been made, mostly very rare formatting instabilities found in random testing. * Sat Oct 30 2021 Tina Müller <timueller+perl@suse.de> - updated to 20211029 see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md [#]# 2021 10 29 - No significant bugs have been found since the last release, but several minor issues have been fixed. Vertical alignment has been improved for lists of call args which are not contained within parens (next item). - Vertical alignment of function calls without parens has been improved with the goal of making vertical alignment essentially the same with or without parens around the call args. Some examples: [#] OLD mkTextConfig $c, $x, $y, -anchor => 'se', $color; mkTextConfig $c, $x + 30, $y, -anchor => 's', $color; mkTextConfig $c, $x + 60, $y, -anchor => 'sw', $color; mkTextConfig $c, $x, $y + 30, -anchor => 'e', $color; [#] NEW mkTextConfig $c, $x, $y, -anchor => 'se', $color; mkTextConfig $c, $x + 30, $y, -anchor => 's', $color; mkTextConfig $c, $x + 60, $y, -anchor => 'sw', $color; mkTextConfig $c, $x, $y + 30, -anchor => 'e', $color; [#] OLD is id_2obj($id), undef, "unregistered object not retrieved"; is scalar keys %$ob_reg, 0, "object registry empty"; is register($obj), $obj, "object returned by register"; is scalar keys %$ob_reg, 1, "object registry nonempty"; is id_2obj($id), $obj, "registered object retrieved"; [#] NEW is id_2obj($id), undef, "unregistered object not retrieved"; is scalar keys %$ob_reg, 0, "object registry empty"; is register($obj), $obj, "object returned by register"; is scalar keys %$ob_reg, 1, "object registry nonempty"; is id_2obj($id), $obj, "registered object retrieved"; This will cause some changes in alignment, hopefully for the better, particularly in test code which often uses numerous parenless function calls with functions like 'ok', 'is', 'is_deeply', .... - Two new parameters were added to control the block types to which the - bl (--opening-brace-on-new-line) flag applies. The new parameters are - block-left-list=s, or -bll=s, and --block-left-exclusion-list=s, or -blxl=s. Previously the -bl flag was 'hardwired' to apply to nearly all blocks. The default values of the new parameters retain the the old default behavior but allow it to be changed. - The default behavior of the -bli (-brace-left-and-indent) flag has changed slightly. Previously, if you set -bli, then the -bl flag would also automatically be set. Consequently, block types which were not included in the default list for -bli would get -bl formatting. This is no longer done, and these two styles are now controlled independently. The manual describes the controls. If you want to recover the exact previous default behavior of the -bli then add the -bl flag. - A partial fix was made for issue for git #74. The -lp formatting style was being lost when a one-line anonymous sub was followed by a closing brace. - Fixed issue git #73, in which the -nfpva flag was not working correctly. Some unwanted vertical alignments of spaced function perens were being made. - Updated the man pages to clarify the flags -valign and -novalign for turning vertical alignment on and off (issue git #72). Added parameters -vc -vsc -vbc for separately turning off vertical alignment of code, side comments and block comments. - Fixed issue git #68, where a blank line following a closing code-skipping comment, '#>>V', could be lost. - This version runs 10 to 15 percent faster on large files than the previous release due to optimizations made with the help of NYTProf. - This version of perltidy was stress-tested for many cpu hours with random input parameters. No instabilities, internal fault checks, undefined variable references or other irregularities were seen. - Numerous minor fixes have been made, mostly very rare formatting instabilities found in random testing. An effort has been made to minimize changes to existing formatting that these fixes produce, but occasional changes may occur. Many of these updates are listed at: https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod * Sun Jul 18 2021 Tina Müller <timueller+perl@suse.de> - updated to 20210717 see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md [#]# 2021 07 17 - This release is being made mainly because of the next item, in which an error message about an uninitialized value error message could be produced in certain cases when format-skipping is used. The error message was annoying but harmless to formatting. - Fixed an undefined variable message, see git #67. When a format skipping comment '#<<' is placed before the first line of code in a script, a message 'Use of uninitialized value $Ktoken_vars in numeric ...' can occur. - A warning will no longer be given if a script has an opening code-skipping comment '#<<V' which is not terminated with a closing comment '#>>V'. This makes code-skipping and format-skipping behave in a similar way: an opening comment without a corresponding closing comment will cause the rest of a file to be skipped. If there is a question about which lines are skipped, a .LOG file can be produced with the -g flag and it will have this information. - Removed the limit on -ci=n when -xci is set, reference: rt #136415. This update removes a limit in the previous two versions in which the value of -ci=n was limited to the value of -i=n when -xci was set. This limit had been placed to avoid some formatting instabilities, but recent coding improvements allow the limit to be removed. - The -wn and -bbxx=n flags were not working together correctly. This has been fixed. - This version may produce occasional differences in formatting compared to previous versions, mainly for lines which are near the specified line length limit. This is due to ongoing efforts to eliminate edge cases of formatting instability. - Numerous minor fixes have been made. A complete list is at: https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod * Fri Jun 25 2021 Tina Müller <timueller+perl@suse.de> - updated to 20210625 see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md [#]# 2021 06 25 - This release adds several new requested parameters. No significant bugs have been found since the last release, but a number of minor problems have been corrected. - Added a new option '--code-skipping', requested in git #65, in which code between comment lines '#<<V' and '#>>V' is passed verbatim to the output stream without error checking. It is simmilar to --format-skipping but there is no error checking of the skipped code. This can be useful for skipping past code which employs an extended syntax. - Added a new option for closing paren placement, -vtc=3, requested in rt #136417. - Added flag -atnl, --add-terminal-newline, to help issue git #58. This flag tells perltidy to terminate the last line of the output stream with a newline character, regardless of whether or not the input stream was terminated with a newline character. This is the default. If this flag is negated, with -natnl, then perltidy will add a terminal newline character to the the output stream only if the input stream is terminated with a newline. - Some nested structures formatted with the -lp indentation option may have some changes in indentation. This is due to updates which were made to prevent formatting instability when line lengths are limited by the maximum line length. Most scripts will not be affected. If this causes unwanted formatting changes, try increasing the --maximum-line-length by a few characters. - Numerous minor fixes have been made. A complete list is at: https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod * Fri Apr 02 2021 Tina Müller <timueller+perl@suse.de> - updated to 20210402 see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md [#]# 2021 04 02 - This release fixes several non-critical bugs which have been found since the last release. An effort has been made to keep existing formatting unchanged. - Fixed issue git #57 regarding uninitialized warning flag. - Added experimental flag -lpxl=s requested in issue git #56 to provide some control over which containers get -lp indentation. - Fixed issue git #55 regarding lack of coordination of the --break-before-xxx flags and the --line-up-parens flag. - Fixed issue git #54 regarding irregular application of the --break-before-paren and similar --break-before-xxx flags, in which lists without commas were not being formatted according to these flags. - Fixed issue git #53. A flag was added to turn off alignment of spaced function parens. If the --space-function-paren, -sfp flag is set, a side-effect is that the spaced function parens may get vertically aligned. This can be undesirable, so a new parameter '--function-paren-vertical-alignment', or '-fpva', has been added to turn this vertical alignment off. The default is '-fpva', so that existing formatting is not changed. Use '-nfpva' to turn off unwanted vertical alignment. To illustrate the possibilities: [#] perltidy [default] myfun( $aaa, $b, $cc ); mylongfun( $a, $b, $c ); [#] perltidy -sfp myfun ( $aaa, $b, $cc ); mylongfun ( $a, $b, $c ); [#] perltidy -sfp -nfpva myfun ( $aaa, $b, $cc ); mylongfun ( $a, $b, $c ); - Fixed issue git #51, a closing qw bare paren was not being outdented when the -nodelete-old-newlines flag was set. - Fixed numerous edge cases involving unusual parameter combinations which could cause alternating output states. Most scripts will not be changed by these fixes. - A more complete list of updates is at https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod * Mon Jan 11 2021 Tina Müller <timueller+perl@suse.de> - updated to 20210111 see /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md [#]# 2021 01 11 - Fixed issue git #49, -se breaks warnings exit status behavior. The exit status flag was not always being set when the -se flag was set. - Some improvements have been made in the method for aligning side comments. One of the problems that was fixed is that there was a tendency for side comment placement to drift to the right in long scripts. Programs with side comments may have a few changes. - Some improvements have been made in formatting qw quoted lists. This fixes issue git #51, in which closing qw pattern delimiters not always following the settings specified by the --closing-token-indentation=n settings. Now qw closing delimiters ')', '}' and ']' follow these flags, and the delimiter '>' follows the flag for ')'. Other qw pattern delimiters remain indented as the are now. This change will cause some small formatting changes in some existing programs. - Another change involving qw lists is that they get full indentation, rather than just continuation indentation, if (1) the closing delimiter is one of } ) ] > and is on a separate line, (2) the opening delimiter (i.e. 'qw{' ) is also on a separate line, and (3) the -xci flag (--extended-continuation-indentation) is set. This improves formatting when qw lists are contained in other lists. For example, [#] OLD: perltidy foreach $color ( qw( AntiqueWhite3 Bisque1 Bisque2 Bisque3 Bisque4 SlateBlue3 RoyalBlue1 SteelBlue2 DeepSkyBlue3 ), qw( LightBlue1 DarkSlateGray1 Aquamarine2 DarkSeaGreen2 SeaGreen1 Yellow1 IndianRed1 IndianRed2 Tan1 Tan4 ) ) [#] NEW, perltidy -xci foreach $color ( qw( AntiqueWhite3 Bisque1 Bisque2 Bisque3 Bisque4 SlateBlue3 RoyalBlue1 SteelBlue2 DeepSkyBlue3 ), qw( LightBlue1 DarkSlateGray1 Aquamarine2 DarkSeaGreen2 SeaGreen1 Yellow1 IndianRed1 IndianRed2 Tan1 Tan4 ) ) - Some minor improvements have been made to the rules for formatting some edge vertical alignment cases, usually involving two dissimilar lines. - A more complete list of updates is at https://github.com/perltidy/perltidy/blob/master/local-docs/BugLog.pod
/usr/bin/perltidy /usr/lib/perl5/vendor_perl/5.40.0/Perl /usr/lib/perl5/vendor_perl/5.40.0/Perl/Tidy /usr/lib/perl5/vendor_perl/5.40.0/Perl/Tidy.pm /usr/lib/perl5/vendor_perl/5.40.0/Perl/Tidy.pod /usr/lib/perl5/vendor_perl/5.40.0/Perl/Tidy/Debugger.pm /usr/lib/perl5/vendor_perl/5.40.0/Perl/Tidy/Diagnostics.pm /usr/lib/perl5/vendor_perl/5.40.0/Perl/Tidy/FileWriter.pm /usr/lib/perl5/vendor_perl/5.40.0/Perl/Tidy/Formatter.pm /usr/lib/perl5/vendor_perl/5.40.0/Perl/Tidy/HtmlWriter.pm /usr/lib/perl5/vendor_perl/5.40.0/Perl/Tidy/IOScalar.pm /usr/lib/perl5/vendor_perl/5.40.0/Perl/Tidy/IOScalarArray.pm /usr/lib/perl5/vendor_perl/5.40.0/Perl/Tidy/IndentationItem.pm /usr/lib/perl5/vendor_perl/5.40.0/Perl/Tidy/Logger.pm /usr/lib/perl5/vendor_perl/5.40.0/Perl/Tidy/Tokenizer.pm /usr/lib/perl5/vendor_perl/5.40.0/Perl/Tidy/VerticalAligner /usr/lib/perl5/vendor_perl/5.40.0/Perl/Tidy/VerticalAligner.pm /usr/lib/perl5/vendor_perl/5.40.0/Perl/Tidy/VerticalAligner/Alignment.pm /usr/lib/perl5/vendor_perl/5.40.0/Perl/Tidy/VerticalAligner/Line.pm /usr/share/doc/packages/perl-Perl-Tidy /usr/share/doc/packages/perl-Perl-Tidy/BUGS.md /usr/share/doc/packages/perl-Perl-Tidy/CHANGES.md /usr/share/doc/packages/perl-Perl-Tidy/README.md /usr/share/doc/packages/perl-Perl-Tidy/docs /usr/share/doc/packages/perl-Perl-Tidy/docs/BugLog.html /usr/share/doc/packages/perl-Perl-Tidy/docs/ChangeLog.html /usr/share/doc/packages/perl-Perl-Tidy/docs/INSTALL.html /usr/share/doc/packages/perl-Perl-Tidy/docs/Tidy.html /usr/share/doc/packages/perl-Perl-Tidy/docs/ci_update.md /usr/share/doc/packages/perl-Perl-Tidy/docs/eos_flag.md /usr/share/doc/packages/perl-Perl-Tidy/docs/index.html /usr/share/doc/packages/perl-Perl-Tidy/docs/index.md /usr/share/doc/packages/perl-Perl-Tidy/docs/perltidy.html /usr/share/doc/packages/perl-Perl-Tidy/docs/stylekey.html /usr/share/doc/packages/perl-Perl-Tidy/docs/tutorial.html /usr/share/doc/packages/perl-Perl-Tidy/examples /usr/share/doc/packages/perl-Perl-Tidy/examples/README /usr/share/doc/packages/perl-Perl-Tidy/examples/bbtidy.pl /usr/share/doc/packages/perl-Perl-Tidy/examples/break_long_quotes.pl /usr/share/doc/packages/perl-Perl-Tidy/examples/delete_ending_blank_lines.pl /usr/share/doc/packages/perl-Perl-Tidy/examples/ex_mp.pl /usr/share/doc/packages/perl-Perl-Tidy/examples/filter_example.in /usr/share/doc/packages/perl-Perl-Tidy/examples/filter_example.pl /usr/share/doc/packages/perl-Perl-Tidy/examples/find_naughty.pl /usr/share/doc/packages/perl-Perl-Tidy/examples/lextest /usr/share/doc/packages/perl-Perl-Tidy/examples/perlcomment.pl /usr/share/doc/packages/perl-Perl-Tidy/examples/perllinetype.pl /usr/share/doc/packages/perl-Perl-Tidy/examples/perlmask.pl /usr/share/doc/packages/perl-Perl-Tidy/examples/perltidy_hide.pl /usr/share/doc/packages/perl-Perl-Tidy/examples/perltidy_okw.pl /usr/share/doc/packages/perl-Perl-Tidy/examples/perlxmltok.pl /usr/share/doc/packages/perl-Perl-Tidy/examples/pt.bat /usr/share/doc/packages/perl-Perl-Tidy/examples/testfa.t /usr/share/doc/packages/perl-Perl-Tidy/examples/testff.t /usr/share/doc/packages/perl-Perl-Tidy/pm2pl /usr/share/licenses/perl-Perl-Tidy /usr/share/licenses/perl-Perl-Tidy/COPYING /usr/share/man/man1/perltidy.1.gz /usr/share/man/man3/Perl::Tidy.3pm.gz
Generated by rpm2html 1.8.1
Fabrice Bellet, Sun Sep 8 00:16:21 2024