Parses and beautifies perl source

Edit Package perl-Perl-Tidy
https://metacpan.org/dist/Perl-Tidy

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.

Refresh
Refresh
Source Files
Filename Size Changed
Perl-Tidy-20221112.tar.gz 0000932475 911 KB
cpanspec.yml 0000000541 541 Bytes
perl-Perl-Tidy.changes 0000073251 71.5 KB
perl-Perl-Tidy.spec 0000002233 2.18 KB
Revision 72 (latest revision is 87)
Stephan Kulow's avatar Stephan Kulow (coolo) accepted request 1037665 from Tina Müller's avatar Tina Müller (tinita) (revision 72)
- 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.
Comments 0
openSUSE Build Service is sponsored by