pkgsrc-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: pkgsrc/devel/p5-Perl-Tidy



Module Name:    pkgsrc
Committed By:   wen
Date:           Tue Jul 30 03:23:51 UTC 2024

Modified Files:
        pkgsrc/devel/p5-Perl-Tidy: Makefile distinfo

Log Message:
Update to 20240511

Upstream changes:
## 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.


To generate a diff of this commit:
cvs rdiff -u -r1.53 -r1.54 pkgsrc/devel/p5-Perl-Tidy/Makefile
cvs rdiff -u -r1.34 -r1.35 pkgsrc/devel/p5-Perl-Tidy/distinfo

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: pkgsrc/devel/p5-Perl-Tidy/Makefile
diff -u pkgsrc/devel/p5-Perl-Tidy/Makefile:1.53 pkgsrc/devel/p5-Perl-Tidy/Makefile:1.54
--- pkgsrc/devel/p5-Perl-Tidy/Makefile:1.53     Sun Apr 28 08:31:27 2024
+++ pkgsrc/devel/p5-Perl-Tidy/Makefile  Tue Jul 30 03:23:51 2024
@@ -1,6 +1,6 @@
-# $NetBSD: Makefile,v 1.53 2024/04/28 08:31:27 wen Exp $
+# $NetBSD: Makefile,v 1.54 2024/07/30 03:23:51 wen Exp $
 
-DISTNAME=      Perl-Tidy-20240202
+DISTNAME=      Perl-Tidy-20240511
 PKGNAME=       p5-${DISTNAME}
 CATEGORIES=    devel perl5
 MASTER_SITES=  ${MASTER_SITE_PERL_CPAN:=Perl/}

Index: pkgsrc/devel/p5-Perl-Tidy/distinfo
diff -u pkgsrc/devel/p5-Perl-Tidy/distinfo:1.34 pkgsrc/devel/p5-Perl-Tidy/distinfo:1.35
--- pkgsrc/devel/p5-Perl-Tidy/distinfo:1.34     Sun Apr 28 08:31:27 2024
+++ pkgsrc/devel/p5-Perl-Tidy/distinfo  Tue Jul 30 03:23:51 2024
@@ -1,5 +1,5 @@
-$NetBSD: distinfo,v 1.34 2024/04/28 08:31:27 wen Exp $
+$NetBSD: distinfo,v 1.35 2024/07/30 03:23:51 wen Exp $
 
-BLAKE2s (Perl-Tidy-20240202.tar.gz) = 682000b49b68d417918880fece79739a6d2e7a18c46892b2004147179df4f5cf
-SHA512 (Perl-Tidy-20240202.tar.gz) = 33d912152285f2ccb304bf7df4f2e055c5f8b3049b9556c7efe5bd2d80123316f9014e8e5f17c9698545394f466f381e306f431450a04e74d767150db43028f5
-Size (Perl-Tidy-20240202.tar.gz) = 1036929 bytes
+BLAKE2s (Perl-Tidy-20240511.tar.gz) = ac2edac0ddf9907e6f0d41561d4f4dba0ee4b5dfcf822bcfb510e1fc5d0e8c63
+SHA512 (Perl-Tidy-20240511.tar.gz) = 39bc383d645092d121a623b90d8b6a7981e2f2ef44dbb41a34ec77e4285fa80f1223d4290363b2ab429b101bb080d738b26d0577068600d78a696948a03bc513
+Size (Perl-Tidy-20240511.tar.gz) = 1077858 bytes



Home | Main Index | Thread Index | Old Index