]> git.donarmstrong.com Git - perltidy.git/blobdiff - CHANGES
New upstream version 20180220
[perltidy.git] / CHANGES
diff --git a/CHANGES b/CHANGES
index 1f6a50a900718be9444e00c9ede2c572f0f5fd07..8415f570d11440b2568b62df42e8a18919e84b6a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,180 @@
 Perltidy Change Log
+  2018 02 20
+      - RT #124469, #124494, perltidy often making empty files.  The previous had
+        an index error causing it to fail, particularly in version 5.18 of Perl.
+
+        Please avoid version 20180219.
+
+  2018 02 19
+      - RT #79947, cuddled-else generalization. A new flag -cb provides
+        'cuddled-else' type formatting for an arbitrary type of block chain. The
+        default is try-catch-finally, but this can be modified with the 
+        parameter -cbl. 
+
+      - Fixed RT #124298: add space after ! operator without breaking !! secret 
+        operator
+
+      - RT #123749: numerous minor improvements to the -wn flag were made.  
+
+      - Fixed a problem with convergence tests in which iterations were stopping 
+        prematurely. 
+
+      - Here doc targets for <<~ type here-docs may now have leading whitespace.
+
+      - Fixed RT #124354. The '-indent-only' flag was not working correctly in the 
+        previous release. A bug in version 20180101 caused extra blank lines 
+        to be output.
+
+      - Issue RT #124114. Some improvements were made in vertical alignment
+        involving 'fat commas'.
+
+  2018 01 01
+      - Added new flag -wn (--weld-nested-containers) which addresses these issues:
+        RT #123749: Problem with promises; 
+        RT #119970: opening token stacking strange behavior;
+        RT #81853: Can't stack block braces
+
+        This option causes closely nested pairs of opening and closing containers
+        to be "welded" together and essentially be formatted as a single unit,
+        with just one level of indentation.
+
+        Since this is a new flag it is set to be "off" by default but it has given 
+        excellent results in testing. 
+
+        EXAMPLE 1, multiple blocks, default formatting:
+            do {
+                {
+                    next if $x == $y;    # do something here
+                }
+            } until $x++ > $z;
+
+        perltidy -wn
+            do { {
+                next if $x == $y;
+            } } until $x++ > $z;
+
+         EXAMPLE 2, three levels of wrapped function calls, default formatting:
+                p(
+                    em(
+                        conjug(
+                            translate( param('verb') ), param('tense'),
+                            param('person')
+                        )
+                    )
+                );
+
+            # perltidy -wn
+                p( em( conjug(
+                    translate( param('verb') ),
+                    param('tense'), param('person')
+                ) ) );
+
+            # EXAMPLE 3, chained method calls, default formatting:
+            get('http://mojolicious.org')->then(
+                sub {
+                    my $mojo = shift;
+                    say $mojo->res->code;
+                    return get('http://metacpan.org');
+                }
+            )->then(
+                sub {
+                    my $cpan = shift;
+                    say $cpan->res->code;
+                }
+            )->catch(
+                sub {
+                    my $err = shift;
+                    warn "Something went wrong: $err";
+                }
+            )->wait;
+
+            # perltidy -wn
+            get('http://mojolicious.org')->then( sub {
+                my $mojo = shift;
+                say $mojo->res->code;
+                return get('http://metacpan.org');
+            } )->then( sub {
+                my $cpan = shift;
+                say $cpan->res->code;
+            } )->catch( sub {
+                my $err = shift;
+                warn "Something went wrong: $err";
+            } )->wait;
+
+
+      - Fixed RT #114359: Missparsing of "print $x ** 0.5;
+
+      - Deactivated the --check-syntax flag for better security.  It will be
+        ignored if set.  
+
+      - Corrected minimum perl version from 5.004 to 5.008 based on perlver
+        report.  The change is required for coding involving wide characters.
+
+      - For certain severe errors, the source file will be copied directly to the
+        output without formatting. These include ending in a quote, ending in a
+        here doc, and encountering an unidentified character.
+
+  2017 12 14
+      - RT #123749, partial fix.  "Continuation indentation" is removed from lines 
+        with leading closing parens which are part of a call chain. 
+        For example, the call to pack() is is now outdented to the starting 
+        indentation in the following experession:  
+
+            # OLD
+            $mw->Button(
+                -text    => "New Document",
+                -command => \&new_document
+              )->pack(
+                -side   => 'bottom',
+                -anchor => 'e'
+              );
+
+            # NEW
+            $mw->Button(
+                -text    => "New Document",
+                -command => \&new_document
+            )->pack(
+                -side   => 'bottom',
+                -anchor => 'e'
+            );
+
+        This modification improves readability of complex expressions, especially
+        when the user uses the same value for continuation indentation (-ci=n) and 
+        normal indentation (-i=n).  Perltidy was already programmed to
+        do this but a minor bug was preventing it.
+
+      - RT #123774, added flag to control space between a backslash and a single or
+        double quote, requested by Robert Rothenberg.  The issue is that lines like
+
+           $str1=\"string1";
+           $str2=\'string2';
+
+        confuse syntax highlighters unless a space is left between the backslash and
+        the quote.
+
+        The new flag to control this is -sbq=n (--space-backslash-quote=n), 
+        where n=0 means no space, n=1 means follow existing code, n=2 means always
+        space.  The default is n=1, meaning that a space will be retained if there
+        is one in the source code.
+
+      - Fixed RT #123492, support added for indented here doc operator <<~ added 
+        in v5.26.  Thanks to Chris Weyl for the report.
+
+      - Fixed docs; --closing-side-comment-list-string should have been just
+        --closing-side-comment-list.  Thanks to F.Li.
+
+      - Added patch RT #122030] Perl::Tidy sometimes does not call binmode.
+        Thanks to Irilis Aelae.
+
+      - Fixed RT #121959, PERLTIDY doesn't honor the 'three dot' notation for 
+        locating a config file using environment variables.  Thanks to John 
+        Wittkowski.
+
+      - Minor improvements to formatting, in which some additional vertical
+        aligmnemt is done. Thanks to Keith Neargarder.
+
+      - RT #119588.  Vertical alignment is no longer done for // operator.
+
   2017 05 21
       - Fixed debian #862667: failure to check for perltidy.ERR deletion can lead 
         to overwriting abritrary files by symlink attack. Perltidy was continuing 
@@ -1313,8 +1489,8 @@ Perltidy Change Log
 
      -improved breakpoint choices involving '->'
 
-     -Corrected tokenization of things like ${#} or ${©}. For example,
-      ${©} is valid, but ${© } is a syntax error.
+     -Corrected tokenization of things like ${#}. For example,
+      ${#} is valid, but ${# } is a syntax error.
 
      -Corrected minor tokenization errors with indirect object notation.
       For example, 'new A::()' works now.