Skip to content

Commit

Permalink
Update to 20250105
Browse files Browse the repository at this point in the history
Upstream changes:
## 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
    );
  • Loading branch information
wen committed Jan 8, 2025
1 parent efbcefc commit 06d6f5d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions devel/p5-Perl-Tidy/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# $NetBSD: Makefile,v 1.56 2024/11/24 08:59:01 wen Exp $
# $NetBSD: Makefile,v 1.57 2025/01/08 07:59:48 wen Exp $

DISTNAME= Perl-Tidy-20240903
DISTNAME= Perl-Tidy-20250105
PKGNAME= p5-${DISTNAME}
CATEGORIES= devel perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Perl/}
Expand Down
8 changes: 4 additions & 4 deletions devel/p5-Perl-Tidy/distinfo
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
$NetBSD: distinfo,v 1.36 2024/11/24 08:59:01 wen Exp $
$NetBSD: distinfo,v 1.37 2025/01/08 07:59:48 wen Exp $

BLAKE2s (Perl-Tidy-20240903.tar.gz) = b55250eb429e436b936d603f8afb299a2f9cb51709d893f99383083341bd75ed
SHA512 (Perl-Tidy-20240903.tar.gz) = 35508885cc69e7dbebb094aebccac799a45e95b7c07648d709a71881f6a69d61b4971b3362e819942fac7f7644523f658b384ec35187f7893bb4ec08f25e3d6f
Size (Perl-Tidy-20240903.tar.gz) = 1111605 bytes
BLAKE2s (Perl-Tidy-20250105.tar.gz) = 2cc3f8b4b31018c1fe85b0c09be262452ad18301176da530047dc8361c23b918
SHA512 (Perl-Tidy-20250105.tar.gz) = ce8706e9c772492cf9f695bb1ede8dff7c7296e53a2a95a851cc7d3fe525a77acbe276430e92cccb0e46249536e78416928777e87063aec23c2b4eac9eec0151
Size (Perl-Tidy-20250105.tar.gz) = 1142977 bytes

0 comments on commit 06d6f5d

Please sign in to comment.