Download Latest Version Perl-Tidy-20250711.tar.gz (1.2 MB)
Email in envelope

Get an email when there's a new version of perltidy

Home / 20230909
Name Modified Size InfoDownloads / Week
Parent folder
README.txt 2023-09-08 3.4 kB
Perl-Tidy-20230909.tar.gz 2023-09-08 988.0 kB
Totals: 2 Items   991.4 kB 0
## Changes from version 20230701 to 20230909

    - 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 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.

Source: README.txt, updated 2023-09-08